On Tue, Aug 31, 2021 at 02:23:29AM +1000, Chris Angelico wrote:
> On Tue, Aug 31, 2021 at 2:19 AM Christopher Barker <python...@gmail.com> 
> wrote:

> > I suppose they provide a real advantage for static typing, but other 
> > than that I just don't see it.
> 
> They provide a *huge* advantage when they can be combined. It's easy
> to accept a flags argument that is the bitwise Or of a collection of
> flags, and then ascertain whether or not a specific flag was included.
> The repr of such a combination is useful and readable, too.

I'm not a big user of Enums, but I *think* that only applies for 
IntEnums?

In any case, in this case it wouldn't make sense to combine NAN 
policies. What would it mean to combine the "raise exception on NAN" and 
"ignore NANs" policies?

-- 
Steve
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/5ULICB4HNZ3I6RRQSGTUEMLZ6SWTP6HF/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to