From 79ff9b271a58b844078957f54dca784f60d191fa Mon Sep 17 00:00:00 2001 From: Thomas Hisch Date: Fri, 19 May 2023 18:55:29 +0200 Subject: [PATCH] Consolidate python examples in enum documentation The IntEnum example in the rst docs is the only example in which a plural classname (Numbers) is used. This change fixes it by renaming Numbers to Number. Closes #104659 --- Doc/library/enum.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index 582e06261afd72..e9c4f0e2c5f59b 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -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.ONE + Numbers.TWO + >>> Number.THREE + + >>> Number.ONE + Number.TWO 3 - >>> Numbers.THREE + 5 + >>> Number.THREE + 5 8 - >>> Numbers.THREE == 3 + >>> Number.THREE == 3 True .. note::