[Python-ideas] Re: Make dataclass aware that it might be used with Enum

2022-07-12 Thread Michael Foord
On Fri, 8 Jul 2022 at 02:22, Steve Jorgensen wrote: > After some playing around, I figured out a pattern that works without any > changes to the implementations of `dataclass` or `Enum`, and I like this > because it keeps the 2 kinds of concern separate. Maybe I'll try submitting > an MR to add a

[Python-ideas] Re: Make dataclass aware that it might be used with Enum

2022-07-12 Thread Steve Jorgensen
Chris Angelico wrote: > On Mon, 11 Jul 2022 at 03:54, Steve Jorgensen [email protected] wrote: > > David Mertz, Ph.D. wrote: > > I've seen this thread, and also wondered why anyone could EVER want a > > dataclass that is an enum. Nothing I've seen in the thread gives me any > > hint about that,

[Python-ideas] Re: Confusing naming of Optional type should be changed

2022-07-12 Thread Kevin Mills
While confusion with optional arguments is somewhat unfortunate, the name came from an already established convention. A lot of languages have exactly the same concept, varying between names like Optional, Option, and Maybe. I don't think coming up with a Python-specific name for the same thing

[Python-ideas] Re: Make dataclass aware that it might be used with Enum

2022-07-12 Thread Michael Foord
On Tue, 12 Jul 2022, 18:05 Steve Jorgensen, wrote: > Chris Angelico wrote: > > On Mon, 11 Jul 2022 at 03:54, Steve Jorgensen [email protected] wrote: > > > David Mertz, Ph.D. wrote: > > > I've seen this thread, and also wondered why anyone could EVER want a > > > dataclass that is an enum. Not

[Python-ideas] Re: Confusing naming of Optional type should be changed

2022-07-12 Thread Stephen J. Turnbull
Kevin Mills writes: > While confusion with optional arguments is somewhat unfortunate, > the name came from an already established convention. A lot of > languages have exactly the same concept, varying between names like > Optional, Option, and Maybe. I don't think coming up with a > Python-