[Python-Dev] Enum: subclassing? (original) (raw)
Barry Warsaw barry at python.org
Thu May 2 17:20:03 CEST 2013
- Previous message: [Python-Dev] Enum: subclassing?
- Next message: [Python-Dev] Enum: subclassing?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On May 01, 2013, at 11:04 AM, Eli Bendersky wrote:
Actually, in flufl.enum, IntEnum had to define a magic valuefactory attribute, but in the current ref435 implementation this isn't needed, so IntEnum is just:
class IntEnum(int, Enum): ''' Class where every instance is a subclass of int. ''' So why don't we just drop IntEnum from the API and tell users they should do the above explicitly, i.e.:
+1
-Barry
- Previous message: [Python-Dev] Enum: subclassing?
- Next message: [Python-Dev] Enum: subclassing?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]