From: Julian Kahnert Date: Sat, 13 Jan 2018 03:35:57 +0000 (+0100) Subject: Improve enum.Flag code example (GH-5167) X-Git-Tag: v3.7.0b1~179 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f31c74fcfdec8f9e6157de2c366f2273de81677;p=python Improve enum.Flag code example (GH-5167) The code example that demonstrate how to use enum.Flag was missing the import of enum.auto. --- diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index 6548adf789..5c1b226efc 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()