[Python-Dev] PEP 520: Ordered Class Definition Namespace (round 3) (original) (raw)
Émanuel Barry vgr255 at live.ca
Sat Jun 11 23:04:32 EDT 2016
- Previous message (by thread): [Python-Dev] PEP 520: Ordered Class Definition Namespace (round 3)
- Next message (by thread): [Python-Dev] PEP 520: Ordered Class Definition Namespace (round 3)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: Eric Snow Sent: Saturday, June 11, 2016 11:02 PM To: Émanuel Barry Cc: Python-Dev Subject: Re: [Python-Dev] PEP 520: Ordered Class Definition Namespace (round 3)
On Sat, Jun 11, 2016 at 7:51 PM, Émanuel Barry <vgr255 at live.ca> wrote: >> From: Eric Snow >> 1. if
_definitionorder_
is defined in the class body then it >> must be atuple
of identifiers orNone
; any other value >> will result inTypeError
> > Why not just any arbitrary iterable, which get converted to a tuple at > runtime? An arbitrary iterable does not necessarily infer a definition order. For example, dict is an iterable but the order is undefined. Also, I'd rather favor simplicity for this (most likely) uncommon corner case of manually setting definitionorder, particularly at the start. If it proves to be a problematic restriction in the future we can loosen it.
Point. This can always be revised later (I'm probably overthinking this as always ;)
-eric
-Emanuel
- Previous message (by thread): [Python-Dev] PEP 520: Ordered Class Definition Namespace (round 3)
- Next message (by thread): [Python-Dev] PEP 520: Ordered Class Definition Namespace (round 3)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]