[Python-checkins] bpo-40721: add note about enum member name case (GH-22231)

Miss Islington (bot) webhook-mailer at python.org
Tue Sep 15 10:05:38 EDT 2020

commit: 624cc10ee4aae513be9f2812f6f5621b6f32f17c
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020-09-14T13:42:38-07:00

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 at stoneleaf.us>

M Doc/library/enum.rst

diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst
index 03aa2f1b21655..8753416a27416 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

More information about the Python-checkins mailing list