[Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Fri Apr 26 09:34: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 ]
Steven D'Aprano wrote:
I don't think iscallable will work, since that descriptors like staticmethod and classmethod aren't callable. Nor are properties.
Hmmm, maybe we should look for a get method as well? Enums of descriptors would seem to fall into the seriously-weird category as well.
Or if, as Guido says, the only sensible things to use as enum values are ints and strings, just leave anything alone that isn't one of those.
-- Greg
- 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 ]