Skip to content

Commit

Permalink
Improve enum.Flag code example (GH-5167)
Browse files Browse the repository at this point in the history
The code example that demonstrate how to use enum.Flag was missing
the import of enum.auto.
  • Loading branch information
JulianKahnert authored and Mariatta committed Jan 13, 2018
1 parent bca4218 commit 0f31c74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Doc/library/enum.rst
Expand Up @@ -654,7 +654,7 @@ value and let :class:`Flag` select an appropriate value.
Like :class:`IntFlag`, if a combination of :class:`Flag` members results in no
flags being set, the boolean evaluation is :data:`False`::

>>> from enum import Flag
>>> from enum import Flag, auto
>>> class Color(Flag):
... RED = auto()
... BLUE = auto()
Expand Down

0 comments on commit 0f31c74

Please sign in to comment.