Re: [Python-Dev] PEP 557 Data Classes 5th posting

2017-12-03 Thread Eric V. Smith
On 12/3/2017 9:07 PM, Eric V. Smith wrote: It also matches `attrs.asdict()`, which is what originally inspired it. Make that `attr.asdict()`. So easy to get that wrong. Eric. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org

Re: [Python-Dev] PEP 557 Data Classes 5th posting

2017-12-03 Thread Eric V. Smith
On 12/3/2017 8:31 PM, Guido van Rossum wrote: On Sun, Dec 3, 2017 at 1:28 PM, Eric V. Smith > wrote: On 12/3/2017 3:33 PM, Antoine Pitrou wrote: Thanks.  I have to ask: why don't "asdict" and "astuple" respect PEP 8 naming? I gues

Re: [Python-Dev] PEP 557 Data Classes 5th posting

2017-12-03 Thread Guido van Rossum
On Sun, Dec 3, 2017 at 1:28 PM, Eric V. Smith wrote: > On 12/3/2017 3:33 PM, Antoine Pitrou wrote: > >> On Sat, 2 Dec 2017 09:02:37 -0500 >> "Eric V. Smith" wrote: >> >>> I've pushed another version of PEP 557. The only difference is changing >>> the default value of "order" to False instead of

Re: [Python-Dev] PEP 557 Data Classes 5th posting

2017-12-03 Thread Eric V. Smith
On 12/3/2017 3:33 PM, Antoine Pitrou wrote: On Sat, 2 Dec 2017 09:02:37 -0500 "Eric V. Smith" wrote: I've pushed another version of PEP 557. The only difference is changing the default value of "order" to False instead of True. This matches regular classes: instances can be tested for equality,

Re: [Python-Dev] PEP 557 Data Classes 5th posting

2017-12-03 Thread Eric V. Smith
Me, either. So I'm going to leave it as a tuple. Unless I find something while reviewing it tonight, I'm done. Eric. On 12/3/2017 3:02 PM, Guido van Rossum wrote: On second thought I don't care that much. On Dec 3, 2017 9:07 AM, "Eric V. Smith" > wrote: On 12/

Re: [Python-Dev] PEP 557 Data Classes 5th posting

2017-12-03 Thread Antoine Pitrou
On Sat, 2 Dec 2017 09:02:37 -0500 "Eric V. Smith" wrote: > I've pushed another version of PEP 557. The only difference is changing > the default value of "order" to False instead of True. This matches > regular classes: instances can be tested for equality, but are unordered. > > Discussion at

Re: [Python-Dev] PEP 557 Data Classes 5th posting

2017-12-03 Thread Guido van Rossum
On second thought I don't care that much. On Dec 3, 2017 9:07 AM, "Eric V. Smith" wrote: > On 12/3/2017 11:56 AM, Guido van Rossum wrote: > >> Not sure I like that better. It's an open-ended sequence of homogeneous >> types. What's the advantage of a tuple? I don't want to blindly follow >> exis

Re: [Python-Dev] PEP 557 Data Classes 5th posting

2017-12-03 Thread Eric V. Smith
On 12/3/2017 11:56 AM, Guido van Rossum wrote: Not sure I like that better. It's an open-ended sequence of homogeneous types. What's the advantage of a tuple? I don't want to blindly follow existing APIs. So people don't modify it, but consenting adults would say "don't do that". I currently

Re: [Python-Dev] PEP 557 Data Classes 5th posting

2017-12-03 Thread Guido van Rossum
Not sure I like that better. It's an open-ended sequence of homogeneous types. What's the advantage of a tuple? I don't want to blindly follow existing APIs. On Sun, Dec 3, 2017 at 6:55 AM, Eric V. Smith wrote: > I've made a minor change: the return type of fields() is now a tuple, it > was a li

Re: [Python-Dev] PEP 557 Data Classes 5th posting

2017-12-03 Thread Eric V. Smith
I've made a minor change: the return type of fields() is now a tuple, it was a list. Eric. On 12/2/2017 9:02 AM, Eric V. Smith wrote: I've pushed another version of PEP 557. The only difference is changing the default value of "order" to False instead of True. This matches regular classes: in