From 0f31c74fcfdec8f9e6157de2c366f2273de81677 Mon Sep 17 00:00:00 2001 From: Julian Kahnert Date: Sat, 13 Jan 2018 04:35:57 +0100 Subject: [PATCH] Improve enum.Flag code example (GH-5167) The code example that demonstrate how to use enum.Flag was missing the import of enum.auto. --- Doc/library/enum.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index 6548adf789da17..5c1b226efc757d 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()