💾 Archived View for tris.fyi › pydoc › enum captured on 2022-03-01 at 15:54:06. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-01-08)
-=-=-=-=-=-=-
This module has no docstring.
Route attribute access on a class to __getattr__. This is a descriptor, used to define attributes that act differently when accessed through an instance and through a class. Instance access remains normal, but access to an attribute through a class will be routed to the class's __getattr__ method; this is done by raising AttributeError. This allows one to have properties active on an instance, and have virtual attributes on the class with the same name (see Enum for an example).
deleter(self, fdel)
getter(self, fget)
setter(self, fset)
Generic enumeration. Derive from this class to define new enumerations.
Metaclass for Enum
mro(self, /) Return a type's method resolution order.
Support for flags
name = <types.DynamicClassAttribute object at 0x7f0227ac4b80> The name of the Enum member.
value = <types.DynamicClassAttribute object at 0x7f0227ac4bb0> The value of the Enum member.
Enum where members are also (and must be) ints
name = <types.DynamicClassAttribute object at 0x7f0227ac4b80> The name of the Enum member.
value = <types.DynamicClassAttribute object at 0x7f0227ac4bb0> The value of the Enum member.
Support for integer-based Flags
copy(...) D.copy() -> a shallow copy of D
get(...) D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
items(...) D.items() -> list of D's (key, value) pairs, as 2-tuples
keys(...) D.keys() -> list of D's keys
values(...) D.values() -> list of D's values
Instances are replaced with an appropriate value in Enum class suites.
value = <object object at 0x7f0227c3c310>
unique(enumeration) Class decorator for enumerations ensuring unique member values.