[issue16167] Allow printing of str-derived classes
Benjamin Peterson
report at bugs.python.org
Mon Oct 8 22:01:22 CEST 2012
Benjamin Peterson added the comment:
Python 3.4.0a0 (default:8f048c8c855e, Oct 8 2012, 13:46:48)
[GCC 4.5.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> class newstring(str):
... def __str__(self):
... return self
...
>>> type(str(newstring()))
<class '__main__.newstring'>
----------
nosy: +benjamin.peterson
resolution: -> invalid
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16167>
_______________________________________
More information about the Python-bugs-list
mailing list