[Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as (original) (raw)

Ethan Furman ethan at stoneleaf.us
Sat Feb 23 17:41:18 CET 2013


eli.bendersky <python-checkins at python.org> wrote:

+Ordered comparisons between enumeration values are not supported. Enums are +not integers!

class WeekDays(Enum): SUNDAY = enum(doc='last day of the weekend') MONDAY = enum(doc='back to work!') TUESDAY = enum(doc='ho hum day') WEDNESDAY = enum(doc='rounding the bend!') THURSDAY = enum(doc='almost Friday!') FRIDAY = enum(doc='last day!') SATURDAY = enum(doc='sleeping in...')

So you're saying that MONDAY should not come before TUESDAY??

-- Ethan



More information about the Python-Dev mailing list