[Python-Dev] PEP 520: Ordered Class Definition Namespace
Nikita Nemkin
nikita at nemkin.ru
Tue Jun 14 05:41:39 EDT 2016
Is there any rationale for rejecting alternatives like:
1. Adding standard metaclass with ordered namespace.
2. Adding `namespace` or `ordered` args to the default metaclass.
3. Making compiler fill in __definition_order__ for every class
(just like __qualname__) without touching the runtime.
?
To me, any of the above seems preferred to complicating
the core part of the language forever.
The vast majority of Python classes don't care about their member
order, this is minority use case receiving majority treatment.
Also, wiring OrderedDict into class creation means elevating it
from a peripheral utility to indispensable built-in type.
More information about the Python-Dev
mailing list