
On Tue, Aug 31, 2021 at 02:23:29AM +1000, Chris Angelico wrote:
On Tue, Aug 31, 2021 at 2:19 AM Christopher Barker <pythonchb@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