Home | Trees | Indices | Help |
---|
|
object --+ | long --+ | Enum
Enumeration abstract base
An Enum subclasses long in order to ensure that instances are a member of a well-defined enumeration of values, provide introspection into the allowed values and their names, and provide symbolic string forms of values.
You should generally subclass one of ValueEnum or FlagEnum.
|
|||
__metaclass__ |
|
|||
|
|||
Inherited from Inherited from |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
a new object with type S, a subtype of T |
|
|
|||
_nametoval =
|
|||
_valtoname =
|
|
|||
Inherited from Inherited from |
|
Import enumeration values into dictionary This method is intended to allow importing enumeration values from an Enum subclass into the root of a module, and should be invoked as: SomeEnumClass.import_items(globals()) |
Validate value as valid for enumeration. This must be implemented in subclasses of Enum (but not ValueEnum or FlagEnum, which provide it). It should raise a ValueError on failure. |
Constructor. Creates a new Enum instance from an ordinary number, validating that is is valid for the particular enumeration.
|
repr(x)
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Jun 29 08:51:16 2017 | http://epydoc.sourceforge.net |