Mention the convenience API in the creation section

This commit is contained in:
Eli Bendersky 2013-04-05 21:02:21 -07:00
parent 97ecde0859
commit 5fb856ed65
1 changed files with 2 additions and 1 deletions

View File

@ -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::