From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 14 Sep 2020 20:49:29 +0000 (-0700) Subject: bpo-40721: add note about enum member name case (GH-22231) X-Git-Tag: v3.9.0rc2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b502c7618d710d31517a7ee6a72890d0963e357a;p=thirdparty%2FPython%2Fcpython.git 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 --- diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index 382db11a72ba..5f0762edc259 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 ---------------