💾 Archived View for tris.fyi › pydoc › enum captured on 2023-04-26 at 13:29:04. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

Back to module index

Go to module by name

enum

This module has no docstring.

Classes

DynamicClassAttribute

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.  (Enum used this between Python
    versions 3.4 - 3.9 .)

    Subclass from this to use a different method of accessing virtual atributes
    and still be treated properly by the inspect module. (Enum uses this since
    Python 3.10 .)

    
deleter(self, fdel)
getter(self, fget)
setter(self, fset)

Enum


    Generic enumeration.

    Derive from this class to define new enumerations.
    

EnumMeta


    Metaclass for Enum
    
mro(self, /)

  Return a type's method resolution order.

Flag


    Support for flags
    
name = <types.DynamicClassAttribute object at 0x7f75e3bec2e0>
  The name of the Enum member.
value = <types.DynamicClassAttribute object at 0x7f75e3bec2b0>
  The value of the Enum member.

IntEnum

Enum where members are also (and must be) ints
name = <types.DynamicClassAttribute object at 0x7f75e3bec2e0>
  The name of the Enum member.
value = <types.DynamicClassAttribute object at 0x7f75e3bec2b0>
  The value of the Enum member.

IntFlag


    Support for integer-based Flags
    

mappingproxy

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() -> a set-like object providing a view on D's items
keys(...)

  D.keys() -> a set-like object providing a view on D's keys
values(...)

  D.values() -> an object providing a view on D's values

auto


    Instances are replaced with an appropriate value in Enum class suites.
    
value = <object object at 0x7f75e3c94340>

Functions

unique

unique(enumeration)


      Class decorator for enumerations ensuring unique member values.
    

Modules

sys