Re: [Python-Dev] PEP520 and absence of __definition_order__

2016-09-11 Thread Nick Coghlan
On 11 September 2016 at 13:05, Nick Coghlan wrote: > VOC & Batavia *should* be OK (worst case, they return > collections.OrderedDict from __prepare__ and also use it for __dict__ > attributes), but I'm less certain about MicroPython (since I don't > know enough about how its

Re: [Python-Dev] PEP520 and absence of __definition_order__

2016-09-11 Thread Ethan Furman
On 09/11/2016 01:55 AM, Victor Stinner wrote: 2016-09-10 3:49 GMT-04:00 Ethan Furman wrote: With __definition_order__ Enum can display the actual creation order of enum members and methods, while relying on Enum.__dict__.keys() presents a jumbled mess with many attributes the user never

Re: [Python-Dev] PEP520 and absence of __definition_order__

2016-09-11 Thread Victor Stinner
2016-09-10 3:49 GMT-04:00 Ethan Furman : > With __definition_order__ Enum can display the actual creation order of enum > members and methods, while relying on Enum.__dict__.keys() presents a > jumbled mess with many attributes the user never wrote, the enum members > either >

Re: [Python-Dev] PEP520 and absence of __definition_order__

2016-09-10 Thread Russell Keith-Magee
On Sun, Sep 11, 2016 at 11:05 AM, Nick Coghlan wrote: > On 11 September 2016 at 07:26, Guido van Rossum wrote: > > On Sat, Sep 10, 2016 at 10:57 AM, Nick Coghlan > wrote: > >> On 11 September 2016 at 03:08, Guido van Rossum

Re: [Python-Dev] PEP520 and absence of __definition_order__

2016-09-10 Thread Nick Coghlan
On 11 September 2016 at 07:26, Guido van Rossum wrote: > On Sat, Sep 10, 2016 at 10:57 AM, Nick Coghlan wrote: >> On 11 September 2016 at 03:08, Guido van Rossum wrote: >>> So I'm happy to continue thinking about this, but I expect this is

Re: [Python-Dev] PEP520 and absence of __definition_order__

2016-09-10 Thread Guido van Rossum
On Sat, Sep 10, 2016 at 10:57 AM, Nick Coghlan wrote: > On 11 September 2016 at 03:08, Guido van Rossum wrote: >> So I'm happy to continue thinking about this, but I expect this is not >> such a big deal as you fear. Anyway, let's see if someone comes up >>

Re: [Python-Dev] PEP520 and absence of __definition_order__

2016-09-10 Thread Eric Snow
On Sep 10, 2016 10:11, "Guido van Rossum" wrote: > > Thanks for bringing this up. I think it's definitely possible to argue > either way. I think what happened before was that I approved > __definition_order__ because I wasn't expecting dict to be ordered by > default. Now that

Re: [Python-Dev] PEP520 and absence of __definition_order__

2016-09-10 Thread Eric Snow
On Sep 10, 2016 11:00, "Nick Coghlan" wrote: > > On 11 September 2016 at 03:08, Guido van Rossum wrote: > > So I'm happy to continue thinking about this, but I expect this is not > > such a big deal as you fear. Anyway, let's see if someone comes up > > with

Re: [Python-Dev] PEP520 and absence of __definition_order__

2016-09-10 Thread Nick Coghlan
On 11 September 2016 at 03:08, Guido van Rossum wrote: > So I'm happy to continue thinking about this, but I expect this is not > such a big deal as you fear. Anyway, let's see if someone comes up > with a more convincing argument by beta 2! For CPython specifically, I don't

Re: [Python-Dev] PEP520 and absence of __definition_order__

2016-09-10 Thread Guido van Rossum
Thanks for bringing this up. I think it's definitely possible to argue either way. I think what happened before was that I approved __definition_order__ because I wasn't expecting dict to be ordered by default. Now that Inada Naoki's patch has landed things have changed. Here's my reason for

Re: [Python-Dev] PEP520 and absence of __definition_order__

2016-09-10 Thread Nick Coghlan
On 10 September 2016 at 19:27, Nick Coghlan wrote: > On 10 September 2016 at 17:49, Ethan Furman wrote: >> The "mostly" is what concerns me. Much like having a custom __dir__ lets >> a class fine-tune what is of interest, a custom __definition_order__

Re: [Python-Dev] PEP520 and absence of __definition_order__

2016-09-10 Thread Terry Reedy
On 9/10/2016 5:27 AM, Nick Coghlan wrote: On 10 September 2016 at 17:49, Ethan Furman wrote: Per Victor's advice I'm posting this here. PEP 520 has been accepted, but without the __definition_order__ attribute. The accompanying comment: "Note: Since compact dict has

Re: [Python-Dev] PEP520 and absence of __definition_order__

2016-09-10 Thread Nick Coghlan
On 10 September 2016 at 17:49, Ethan Furman wrote: > Per Victor's advice I'm posting this here. > > PEP 520 has been accepted, but without the __definition_order__ attribute. > The accompanying comment: > >> "Note: Since compact dict has landed in 3.6, __definition_order__ has

[Python-Dev] PEP520 and absence of __definition_order__

2016-09-10 Thread Ethan Furman
Per Victor's advice I'm posting this here. PEP 520 has been accepted, but without the __definition_order__ attribute. The accompanying comment: "Note: Since compact dict has landed in 3.6, __definition_order__ has been removed. cls.__dict__ now mostly accomplishes the same thing instead."