[Python-Dev] PEP: Ordered Class Definition Namespace
Raymond Hettinger
raymond.hettinger at gmail.com
Tue Jun 7 19:03:57 EDT 2016
More information about the Python-Dev mailing list
Tue Jun 7 19:03:57 EDT 2016
- Previous message (by thread): [Python-Dev] PEP: Ordered Class Definition Namespace
- Next message (by thread): [Python-Dev] PEP: Ordered Class Definition Namespace
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> On Jun 7, 2016, at 10:51 AM, Eric Snow <ericsnowcurrently at gmail.com> wrote: > > This PEP changes the default class definition namespace to ``OrderedDict``. I think this would be a nice improvement. > Furthermore, the order in which the attributes are defined in each class > body will now be preserved in ``type.__definition_order__``. This allows > introspection of the original definition order, e.g. by class decorators. I'm unclear on why this would be needed. Wouldn't the OrderedDict be sufficient for preserving definition order? Raymond
- Previous message (by thread): [Python-Dev] PEP: Ordered Class Definition Namespace
- Next message (by thread): [Python-Dev] PEP: Ordered Class Definition Namespace
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list