[Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library (original) (raw)
Barry Warsaw barry at python.org
Fri Apr 12 17:37:55 CEST 2013
- Previous message: [Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library
- Next message: [Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Apr 12, 2013, at 11:29 AM, R. David Murray wrote:
You get that automatically if you return NotImplemented from the comparison methods. I don't think you should be explicitly raising NotImplemented.
Oh darn, this doesn't work for Python 2.7. You don't care for PEP 435, but flufl.enum will have to raise the TypeError explicitly for consistency.
-Barry
- Previous message: [Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library
- Next message: [Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]