summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-09-14 20:49:29 (GMT)
committerGitHub <noreply@github.com>2020-09-14 20:49:29 (GMT)
commitb502c7618d710d31517a7ee6a72890d0963e357a (patch)
treeef535605a8b80e149ad90a0ded990f52404af473 /Doc/library
parentbf7d4d039c46232262a0f736f12761b085a6e7a8 (diff)
downloadcpython-b502c7618d710d31517a7ee6a72890d0963e357a.zip
cpython-b502c7618d710d31517a7ee6a72890d0963e357a.tar.gz
cpython-b502c7618d710d31517a7ee6a72890d0963e357a.tar.bz2
bpo-40721: add note about enum member name case (GH-22231)
* UPPER_CASE preferred as enum members are constants (cherry picked from commit 542e1df2b018ee7068dba8076f2d6e84efd6e144) Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/enum.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst
index 382db11..5f0762e 100644
--- a/Doc/library/enum.rst
+++ b/Doc/library/enum.rst
@@ -19,6 +19,12 @@ An enumeration is a set of symbolic names (members) bound to unique,
constant values. Within an enumeration, the members can be compared
by identity, and the enumeration itself can be iterated over.
+.. note:: Case of Enum Members
+
+ Because Enums are used to represent constants we recommend using
+ UPPER_CASE names for enum members, and will be using that style
+ in our examples.
+
Module Contents
---------------