Skip to content

Commit 29b1aff

Browse files
miss-islingtonMariatta
authored andcommitted
Improve enum.Flag code example (GH-5167) (GH-5171)
The code example that demonstrate how to use enum.Flag was missing the import of enum.auto. (cherry picked from commit 0f31c74)
1 parent d55d682 commit 29b1aff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/library/enum.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ value and let :class:`Flag` select an appropriate value.
654654
Like :class:`IntFlag`, if a combination of :class:`Flag` members results in no
655655
flags being set, the boolean evaluation is :data:`False`::
656656

657-
>>> from enum import Flag
657+
>>> from enum import Flag, auto
658658
>>> class Color(Flag):
659659
... RED = auto()
660660
... BLUE = auto()

0 commit comments

Comments
 (0)