]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-104659: Consolidate python examples in enum documentation (#104665)
authorThomas Hisch <t.hisch@gmail.com>
Fri, 19 May 2023 17:46:20 +0000 (19:46 +0200)
committerGitHub <noreply@github.com>
Fri, 19 May 2023 17:46:20 +0000 (11:46 -0600)
Doc/library/enum.rst

index 582e06261afd7225bdfac94a35848a645caa812c..e9c4f0e2c5f59b2f495551aa62607678245477cf 100644 (file)
@@ -406,18 +406,18 @@ Data Types
    with an *IntEnum* member, the resulting value loses its enumeration status.
 
       >>> from enum import IntEnum
-      >>> class Numbers(IntEnum):
+      >>> class Number(IntEnum):
       ...     ONE = 1
       ...     TWO = 2
       ...     THREE = 3
       ...
-      >>> Numbers.THREE
-      <Numbers.THREE: 3>
-      >>> Numbers.ONE + Numbers.TWO
+      >>> Number.THREE
+      <Number.THREE: 3>
+      >>> Number.ONE + Number.TWO
       3
-      >>> Numbers.THREE + 5
+      >>> Number.THREE + 5
       8
-      >>> Numbers.THREE == 3
+      >>> Number.THREE == 3
       True
 
    .. note::