Mention the convenience API in the creation section
This commit is contained in:
parent
97ecde0859
commit
5fb856ed65
|
@ -96,7 +96,8 @@ Creating an Enum
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
Enumerations are created using the class syntax, which makes them easy to read
|
Enumerations are created using the class syntax, which makes them easy to read
|
||||||
and write. Every enumeration value must have a unique integer value and the
|
and write. An alternative creation method is described in `Convenience API`_.
|
||||||
|
Every enumeration value must have a unique integer value and the
|
||||||
only restriction on their names is that they must be valid Python identifiers.
|
only restriction on their names is that they must be valid Python identifiers.
|
||||||
To define an enumeration, derive from the ``Enum`` class and add attributes
|
To define an enumeration, derive from the ``Enum`` class and add attributes
|
||||||
with assignment to their integer values::
|
with assignment to their integer values::
|
||||||
|
|
Loading…
Reference in New Issue