summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-01-13 04:23:21 (GMT)
committerMariatta <Mariatta@users.noreply.github.com>2018-01-13 04:23:21 (GMT)
commit29b1aff71805df4c5b6f55c02bda94d07c044c81 (patch)
tree6fef8d5bfceb047352be7340990f45c3bbcf8011 /Doc
parentd55d6825d7bd0fc120c95d579065623ce6392a2f (diff)
downloadcpython-29b1aff71805df4c5b6f55c02bda94d07c044c81.zip
cpython-29b1aff71805df4c5b6f55c02bda94d07c044c81.tar.gz
cpython-29b1aff71805df4c5b6f55c02bda94d07c044c81.tar.bz2
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 0f31c74fcfdec8f9e6157de2c366f2273de81677)
Diffstat (limited to 'Doc')
-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()