Quick question for Pythonistas:
How (un)Pythonic is it to subclass built-in Python objects like str, list, and dict?
class MyString(str):
pass
It is possible to do it, but there’s significantly more friction than there is in, say, Ruby, especially for further subclasses.
8%
Very Pythonic
15%
Fairly Pythonic
23%
Fairly unPythonic
54%
Very unPythonic
13 votes • Final results