[Python-ideas] PEP XXX - Competitor with PEP 435: Adding an enum type to the Python standard library

random832 at fastmail.us random832 at fastmail.us
Wed Mar 13 14:35:26 CET 2013

On Wed, Mar 13, 2013, at 2:08, Andrew Barnert wrote:
> Which means, as I said in another message, that Day.FRIDAY -
> Day.WEDNESDAY is not 2, but Day.FRIDAY. Which I'm pretty sure most people
> would find surprising.
> Unless you want bitmask and ordered int enums to be different types,

That was part of my suggestion - I might not have been clear enough.

Anyway - why would you subtract weekdays instead of subtracting the
actual timestamps they're from and getting the number of days from the
resulting timedelta? What makes you think a weekday enum wouldn't be a
flag enum (so you can say an appointment is every monday, wednesday, and

More information about the Python-ideas mailing list