Josh Rosenberg added the comment:

Is it common for C implementations to introspect to figure out their "real" 
name? I do this manually for reprs of my user defined classes, but I haven't 
noticed many built-ins that consider extensibility for the repr. Maybe I'm just 
not using the classes that do it or I'm overriding the repr without checking?

I just tested, and it looks like frozenset has a subclass friendly repr, while 
bytearray does not as of 3.4.0. Seems like it might make sense to first 
determine if introspection should be the default; it would mean a little code 
bloat every time it's done.

----------
nosy: +josh.rosenberg

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21861>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to