]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40721: add note about enum member name case (GH-22231)
authorEthan Furman <ethan@stoneleaf.us>
Mon, 14 Sep 2020 20:32:44 +0000 (13:32 -0700)
committerGitHub <noreply@github.com>
Mon, 14 Sep 2020 20:32:44 +0000 (13:32 -0700)
* UPPER_CASE preferred as enum members are constants

Doc/library/enum.rst

index 00bfb260c02047296105a5b134e91acbd647ab31..32e8bbf95092733c234fb607fed55abeaae88517 100644 (file)
@@ -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
 ---------------