Clarify that int(Enum) facilitates interoperability with C extensions that

expect integer values.
This commit is contained in:
Eli Bendersky 2013-02-25 06:16:51 -08:00
parent 373b80f240
commit e24ea517b3
1 changed files with 2 additions and 1 deletions

View File

@ -237,7 +237,8 @@ values will always compare not equal::
If you really want the integer equivalent values, you can convert enumeration
values explicitly using the ``int()`` built-in. This is quite convenient for
storing enums in a database for example::
storing enums in a database, as well as for interoperability with C extensions
that expect integers::
>>> int(Colors.red)
1