[Python-Dev] PEP 520: Ordered Class Definition Namespace (original) (raw)
Victor Stinner victor.stinner at gmail.com
Wed Jun 8 04:07:27 EDT 2016
- Previous message (by thread): [Python-Dev] PEP 520: Ordered Class Definition Namespace
- Next message (by thread): [Python-Dev] PEP 520: Ordered Class Definition Namespace
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Abstract ========
This PEP changes the default class definition namespace to
OrderedDict
. Furthermore, the order in which the attributes are defined in each class body will now be preserved intype._definitionorder_
. This allows introspection of the original definition order, e.g. by class decorators. Note: just to be clear, this PEP is not about changing_dict_
for classes toOrderedDict
.
What is the cost in term of performance?
What can be slower: define a new class and/or instanciate a class?
Victor
- Previous message (by thread): [Python-Dev] PEP 520: Ordered Class Definition Namespace
- Next message (by thread): [Python-Dev] PEP 520: Ordered Class Definition Namespace
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]