[issue27366] PEP487: Simpler customization of class creation
Nick Coghlan
report at bugs.python.org
Sun Jul 24 01:33:49 EDT 2016
Nick Coghlan added the comment:
Scratch that, my revised idea is fundamentally broken, as this example illustrates:
>>> class BaseClass: pass
...
>>> class OtherClass: pass
...
>>> class SubClass(OtherClass, BaseClass): pass
...
>>> SubClass.mro()
[<class '__main__.SubClass'>, <class '__main__.OtherClass'>, <class '__main__.BaseClass'>, <class 'object'>]
The PEP as written handles this correctly, while the alternative signature would fail miserably ("OtherClass" wouldn't chain up to "BaseClass" properly). So I'll review the rest of the patch, and we can figure out the documentation problem later.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27366>
_______________________________________
More information about the Python-bugs-list
mailing list