summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/enum.py4
-rw-r--r--Lib/test/test_enum.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/Lib/enum.py b/Lib/enum.py
index 4beb187a4a..3f5ecbb5ce 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -267,7 +267,7 @@ class EnumMeta(type):
This method is used both when an enum class is given a value to match
to an enumeration member (i.e. Color(3)) and for the functional API
- (i.e. Color = Enum('Color', names='red green blue')).
+ (i.e. Color = Enum('Color', names='RED GREEN BLUE')).
When used for the functional API:
@@ -517,7 +517,7 @@ class Enum(metaclass=EnumMeta):
# without calling this method; this method is called by the metaclass'
# __call__ (i.e. Color(3) ), and by pickle
if type(value) is cls:
- # For lookups like Color(Color.red)
+ # For lookups like Color(Color.RED)
return value
# by-value search for a matching enum member
# see if it's in the reverse mapping (for hashable values)
diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py
index 2b3bfea916..e97ef947b1 100644
--- a/Lib/test/test_enum.py
+++ b/Lib/test/test_enum.py
@@ -69,9 +69,9 @@ except Exception as exc:
# for doctests
try:
class Fruit(Enum):
- tomato = 1
- banana = 2
- cherry = 3
+ TOMATO = 1
+ BANANA = 2
+ CHERRY = 3
except Exception:
pass