Package dbf :: Module ver_32 :: Class AutoEnum
[hide private]
[frames] | no frames]

Class AutoEnum

source code

                                     object --+        
                                              |        
                                            int --+    
                                                  |    
EnumMeta('Enum', (object,), temp_enum_dict) --+   |    
                                              |   |    
                                           Enum --+    
                                                  |    
                                            IntEnum --+
                                                      |
                                                     AutoEnum

Automatically numbers enum members starting from __number__ (defaults to 0).

Includes support for a custom docstring per member.

Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(cls, *args)
Ignores arguments (will be handled in __init__.
source code
 
__init__(self, *args)
Can handle 0 or 1 argument; more requires a custom __init__.
source code

Inherited from int: __abs__, __add__, __and__, __cmp__, __coerce__, __div__, __divmod__, __float__, __floordiv__, __format__, __getattribute__, __getnewargs__, __hash__, __hex__, __index__, __int__, __invert__, __long__, __lshift__, __mod__, __mul__, __neg__, __nonzero__, __oct__, __or__, __pos__, __pow__, __radd__, __rand__, __rdiv__, __rdivmod__, __repr__, __rfloordiv__, __rlshift__, __rmod__, __rmul__, __ror__, __rpow__, __rrshift__, __rshift__, __rsub__, __rtruediv__, __rxor__, __str__, __sub__, __truediv__, __trunc__, __xor__, bit_length, conjugate

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from Enum: export_to

Class Variables [hide private]
  __number__ = 0
Properties [hide private]

Inherited from int: denominator, imag, numerator, real

Inherited from object: __class__

Method Details [hide private]

__new__(cls, *args)

source code 

Ignores arguments (will be handled in __init__.

Returns: a new object with type S, a subtype of T
Overrides: object.__new__

__init__(self, *args)
(Constructor)

source code 

Can handle 0 or 1 argument; more requires a custom __init__.

0 = auto-number w/o docstring 1 = auto-number w/ docstring 2+ = needs custom __init__

Overrides: object.__init__