[Python-Dev] PEP: Ordered Class Definition Namespace (original) (raw)
Ethan Furman ethan at stoneleaf.us
Fri Jun 10 00:57:45 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 06/07/2016 11:13 AM, Eric Snow wrote:
On Tue, Jun 7, 2016 at 11:01 AM, Ethan Furman <ethan at stoneleaf.us> wrote:
On 06/07/2016 10:51 AM, Eric Snow wrote:
Specification =============
* types for which `_prepare_()
returned something other than_ _
OrderedDict(or a subclass) have their
_definitionorder__ _set to
None`` I assume this check happens in type.new? If a non-OrderedDict is used as the namespace, but a definitionorder key and value are supplied, is it used or still set to None? A definitionorder in the class body always takes precedence. So a supplied value will be honored (and not replaced with None).
Nice. I'll add it to the Enum, enum34, and aenum as soon as it lands (give or take a couple months ;)
--
Ethan
- 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 ]