[issue24254] Make class definition namespace ordered by default
Nick Coghlan
report at bugs.python.org
Mon Aug 29 23:10:49 EDT 2016
Nick Coghlan added the comment:
Because we're not making ordered-by-default dicts a language specification level requirement, so portable code can't rely on them.
However, the PEP at https://www.python.org/dev/peps/pep-0520/ is deliberately worded so that there's no requirement for the class body execution namespace to specifically be collections.OrderedDict - it just needs to be order preserving so that __definition_order__ can be populated.
If someone reviews and merges the compact ordered dict patch, then this patch can likely be made a lot simpler.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24254>
_______________________________________
More information about the Python-bugs-list
mailing list