Terry J. Reedy added the comment:

Such a list might differentiate between classes that are intentionally not 
subclassed and those for which subclassing simply has not yet been enabled. 
That might help eliminate the latter list.

When I suggested on the python-ideas 'range' thread that people should best get 
what they wanted with a range subclass, if that were made possible, Nick C. 
replied "I wasn't even aware you *couldn't* subclass it (I'd never tried).". 
Indeed, why would he with no doc.

The types module doc could also use an addition.
Attached subclassable.py produces these lists:
Among named builtin classes, these cannot be subclassed:
bool, memoryview, range, slice, 
Among types classes, these can be subclassed:
ModuleType, SimpleNamespace,

----------
Added file: http://bugs.python.org/file29216/subclassable.py

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

Reply via email to