[Python-Dev] Re: python-iterators mailing list on SourceForge

2021-05-29 Thread Guido van Rossum
All right, I have changed the status to "hidden" (I'm not sure what that
means but I suspect that it's not listed but if you happen to have a link
you can see it). It looks like what's left of the archives is largely spam?

Feel free to send a PR that unlinks it from the PEP.

On Fri, May 28, 2021 at 2:37 PM Julien Palard via Python-Dev <
[email protected]> wrote:

> Some bad news about [email protected], looks like
> sourceforge lost a huge part of the mailing list: they have 0 message
> before Sep. 2001.
>
> So I think I'll soon drop the link(s) refering to it in the PEPs.
>
> --
> [Julien Palard](https://mdk.fr)
>
> ___
> Python-Dev mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/[email protected]/message/ZF64Y53M3KEKAGROORJA6SD6GPX2HDJO/
> Code of Conduct: http://python.org/psf/codeofconduct/
>


-- 
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*

___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/BFLD6AIFGEUON3C3D2ZMCSXAGS6C6AVB/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: name for new Enum decorator

2021-05-29 Thread Nick Coghlan
On Sat, 29 May 2021, 7:27 am Ethan Furman,  wrote:

> On 5/28/21 12:43 AM, Petr Viktorin wrote:
>  > On 28. 05. 21 5:24, Ethan Furman wrote:
>
>  >>  class FlagWithMasks(IntFlag):
>  >>  DEFAULT = 0x0
>  >>
>  >>  FIRST_MASK = 0xF
>  >>  FIRST_ROUND = 0x0
>  >>  FIRST_CEIL = 0x1
>  >>  FIRST_TRUNC = 0x2
>  >>
>  >>  SECOND_MASK = 0xF0
>  >>  SECOND_RECALC = 0x00
>  >>  SECOND_NO_RECALC = 0x10
>  >>
>  >>  THIRD_MASK = 0xF00
>  >>  THIRD_DISCARD = 0x000
>  >>  THIRD_KEEP = 0x100
>  >>
>  >> Here we have three flags (FIRST_MASK, SECOND_MASK, THIRD_MASK) that
> are aliasing values
>  >> that don't exist, but it seems intentional and not an error.
>  >
>  > Are you looking for a decorator for the whole Enum, or a way to mark
> individual *values* as masks?
>
> The decorator is for whole enum.  The issue is not that some values are
> masks, but whether the absence of named bits
> covered by the mask is an error.
>


If you were prepared to incur a deprecation period, then you could make the
decorator "@allow_masks" and flip the default behaviour to emit Deprecation
Warning for masks, eventually upgrading it to Value Error.

Otherwise, maybe something like "@no_masks"?

Cheers,
Nick.





> --
> ~Ethan~
> ___
> Python-Dev mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/[email protected]/message/OM5M774MP5QPLFXZ7OVGBPR7ZFB6X35A/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/C6ZYW7PFTPUETPCKLD57O7SWV6GK4M63/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: name for new Enum decorator

2021-05-29 Thread Glenn Linderman

On 5/29/2021 6:33 PM, Nick Coghlan wrote:
On Sat, 29 May 2021, 7:27 am Ethan Furman, > wrote:


On 5/28/21 12:43 AM, Petr Viktorin wrote:
 > On 28. 05. 21 5:24, Ethan Furman wrote:

 >>      class FlagWithMasks(IntFlag):
 >>          DEFAULT = 0x0
 >>
 >>          FIRST_MASK = 0xF
 >>          FIRST_ROUND = 0x0
 >>          FIRST_CEIL = 0x1
 >>          FIRST_TRUNC = 0x2
 >>
 >>          SECOND_MASK = 0xF0
 >>          SECOND_RECALC = 0x00
 >>          SECOND_NO_RECALC = 0x10
 >>
 >>          THIRD_MASK = 0xF00
 >>          THIRD_DISCARD = 0x000
 >>          THIRD_KEEP = 0x100
 >>
 >> Here we have three flags (FIRST_MASK, SECOND_MASK, THIRD_MASK)
that are aliasing values
 >> that don't exist, but it seems intentional and not an error.
 >
 > Are you looking for a decorator for the whole Enum, or a way to
mark individual *values* as masks?

The decorator is for whole enum.  The issue is not that some
values are masks, but whether the absence of named bits
covered by the mask is an error.



If you were prepared to incur a deprecation period, then you could 
make the decorator "@allow_masks" and flip the default behaviour to 
emit Deprecation Warning for masks, eventually upgrading it to Value 
Error.


Otherwise, maybe something like "@no_masks"?


"Mask" is one typical usage for combined flags, but not the only one.  I 
would not recommend using "mask" in the name of the decorator.
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/LJ4NAGIKVG3PTJBBXWUVZM77S7K5JI7R/
Code of Conduct: http://python.org/psf/codeofconduct/