summaryrefslogtreecommitdiffstats
path: root/Doc/library/enum.rst
diff options
context:
space:
mode:
authorJulian Kahnert <mail@juliankahnert.de>2018-01-13 03:35:57 (GMT)
committerMariatta <Mariatta@users.noreply.github.com>2018-01-13 03:35:57 (GMT)
commit0f31c74fcfdec8f9e6157de2c366f2273de81677 (patch)
treec666768195cd83b28a72e8bde6a53b43894e4a2d /Doc/library/enum.rst
parentbca42186b69e2e615d29d0d4fdb493c9fe71c48b (diff)
downloadcpython-0f31c74fcfdec8f9e6157de2c366f2273de81677.zip
cpython-0f31c74fcfdec8f9e6157de2c366f2273de81677.tar.gz
cpython-0f31c74fcfdec8f9e6157de2c366f2273de81677.tar.bz2
Improve enum.Flag code example (GH-5167)
The code example that demonstrate how to use enum.Flag was missing the import of enum.auto.
Diffstat (limited to 'Doc/library/enum.rst')
-rw-r--r--Doc/library/enum.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst
index 6548adf..5c1b226 100644
--- a/Doc/library/enum.rst
+++ b/Doc/library/enum.rst
@@ -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()