Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 542e1df

Browse files
authored
bpo-40721: add note about enum member name case (GH-22231)
* UPPER_CASE preferred as enum members are constants
1 parent 7c11a9a commit 542e1df

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Doc/library/enum.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ An enumeration is a set of symbolic names (members) bound to unique,
1919
constant values. Within an enumeration, the members can be compared
2020
by identity, and the enumeration itself can be iterated over.
2121

22+
.. note:: Case of Enum Members
23+
24+
Because Enums are used to represent constants we recommend using
25+
UPPER_CASE names for enum members, and will be using that style
26+
in our examples.
27+
2228

2329
Module Contents
2430
---------------

0 commit comments

Comments
 (0)