[Python-Dev] Re: stdlib Flag Enums and the "no value" member

2021-04-29 Thread MRAB
On 2021-04-29 18:56, Ethan Furman wrote: On 4/29/21 10:52 AM, Antoine Pitrou wrote: > On Thu, 29 Apr 2021 18:37:29 +0100, MRAB wrote: >> On 2021-04-29 18:19, Ethan Furman wrote: >>> An excerpt from bpo-31369: re.RegexFlag and `__all__` >>> >>> GvR: >>> >>>> One thing I

[Python-Dev] Re: stdlib Flag Enums and the "no value" member

2021-04-29 Thread Chris Angelico
On Fri, Apr 30, 2021 at 4:28 AM Jonathan Goble wrote: > > On Thu, Apr 29, 2021 at 2:00 PM Ethan Furman wrote: >> >> On 4/29/21 10:35 AM, Jonathan Goble wrote: >> > On Thu, Apr 29, 2021 at 1:20 PM Ethan Furman wrote: >> >> >> >> Which raises the question: Do we want to have a standard name for

[Python-Dev] Re: stdlib Flag Enums and the "no value" member

2021-04-29 Thread Jonathan Goble
On Thu, Apr 29, 2021 at 2:00 PM Ethan Furman wrote: > On 4/29/21 10:35 AM, Jonathan Goble wrote: > > On Thu, Apr 29, 2021 at 1:20 PM Ethan Furman wrote: > > > >> Which raises the question: Do we want to have a standard name for > stdlib Flags when no flags are set? > > > > If you want a

[Python-Dev] Re: stdlib Flag Enums and the "no value" member

2021-04-29 Thread Ethan Furman
On 4/29/21 10:35 AM, Jonathan Goble wrote: > On Thu, Apr 29, 2021 at 1:20 PM Ethan Furman wrote: >> Which raises the question: Do we want to have a standard name for stdlib Flags when no flags are set? > > If you want a flag to represent no flags set, it takes one line to write it yourself,

[Python-Dev] Re: stdlib Flag Enums and the "no value" member

2021-04-29 Thread Ethan Furman
On 4/29/21 10:52 AM, Antoine Pitrou wrote: > On Thu, 29 Apr 2021 18:37:29 +0100, MRAB wrote: >> On 2021-04-29 18:19, Ethan Furman wrote: >>> An excerpt from bpo-31369: re.RegexFlag and `__all__` >>> >>> GvR: >>> >>>> One thing I discovered when developing this example: there doesn't

[Python-Dev] Re: stdlib Flag Enums and the "no value" member

2021-04-29 Thread Antoine Pitrou
On Thu, 29 Apr 2021 18:37:29 +0100 MRAB wrote: > On 2021-04-29 18:19, Ethan Furman wrote: > > An excerpt from bpo-31369: re.RegexFlag and `__all__` > > > > GvR: > > > > > One thing I discovered when developing this example: there doesn't seem > > to be a flag to > > > represent 0

[Python-Dev] Re: stdlib Flag Enums and the "no value" member

2021-04-29 Thread MRAB
On 2021-04-29 18:19, Ethan Furman wrote: An excerpt from bpo-31369: re.RegexFlag and `__all__` GvR: > One thing I discovered when developing this example: there doesn't seem to be a flag to > represent 0 (zero), i.e. "no flags". And foo(0) is a type error (even though it works >

[Python-Dev] Re: stdlib Flag Enums and the "no value" member

2021-04-29 Thread Jonathan Goble
On Thu, Apr 29, 2021 at 1:20 PM Ethan Furman wrote: > An excerpt from bpo-31369: re.RegexFlag and `__all__` > > GvR: > > > One thing I discovered when developing this example: there doesn't seem > to be a flag to > > represent 0 (zero), i.e. "no flags". And foo(0) is a type error (even >