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

2017-12-04 Thread Eric V. Smith
On 12/4/2017 5:19 PM, Ivan Levkivskyi wrote: Congratulations, Eric! This is a great PEP and I am looking forward to implement support for it in mypy ;-) Thanks for all of your help, Ivan, especially for design decisions that help interoperability with mypy. I'm looking forward to mypy

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

2017-12-04 Thread Ivan Levkivskyi
Congratulations, Eric! This is a great PEP and I am looking forward to implement support for it in mypy ;-) -- Ivan On 4 December 2017 at 18:17, Guido van Rossum wrote: > And with this, I'm accepting PEP 557, Data Classes. > > Eric, congrats with your efforts in proposing

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

2017-12-04 Thread Raymond Hettinger
> On Dec 4, 2017, at 9:17 AM, Guido van Rossum wrote: > > And with this, I'm accepting PEP 557, Data Classes. Woohoo! I think everyone was looking forward to this moment. Raymond ___ Python-Dev mailing list

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

2017-12-04 Thread Eric V. Smith
Thanks, Guido. And indeed, thanks to everyone else who provided inspiration and feedback. I too would like to thank Hynek and the other authors of “attrs”. I’ll get the implementation committed in the next day or so. -- Eric. > On Dec 4, 2017, at 12:17 PM, Guido van Rossum

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

2017-12-04 Thread Ethan Furman
On 12/04/2017 09:17 AM, Guido van Rossum wrote: And with this, I'm accepting PEP 557, Data Classes. Congratulations, Eric! Data Classes will be a handy thing to have. :) -- ~Ethan~ ___ Python-Dev mailing list Python-Dev@python.org

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

2017-12-04 Thread Guido van Rossum
And with this, I'm accepting PEP 557, Data Classes. Eric, congrats with your efforts in proposing and implementing this PEP and guiding it through the discussion! It's been great to see this idea come to fruition. Thanks also to the many people who reviewed drafts or implementation code,

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

2017-12-04 Thread Eric V. Smith
On 12/3/2017 9:07 PM, Eric V. Smith wrote: 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

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

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

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

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

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"

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

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

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

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:

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

2017-12-02 Thread Eric V. Smith
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 https://github.com/ericvsmith/dataclasses/issues/104 It's already