aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/enum.py
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2016-11-21 09:22:05 -0800
committerEthan Furman <ethan@stoneleaf.us>2016-11-21 09:22:05 -0800
commit23bb6f48ea30e805b558a4e03849c362029ca7c4 (patch)
tree8109cb1787acc3949014320885ceaa234c37fa1b /Lib/enum.py
parent64a6861b0f113002763407159fe287a5c38a8fa2 (diff)
downloadcpython-23bb6f48ea30e805b558a4e03849c362029ca7c4.tar.gz
cpython-23bb6f48ea30e805b558a4e03849c362029ca7c4.zip
close issue28172: Change all example enum member names to uppercase, per Guido; patch by Chris Angelico.
Diffstat (limited to 'Lib/enum.py')
-rw-r--r--Lib/enum.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/enum.py b/Lib/enum.py
index 4beb187a4ad..3f5ecbb5cea 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)