Skip to content

Commit 52540a2

Browse files
[3.15] Use EnumType instead of EnumMeta in enum's examples (GH-163060) (#163086)
Use `EnumType` instead of `EnumMeta` in enum's examples (GH-163060) (cherry picked from commit 94e7d73) Co-authored-by: Ali <105012194+aliysnm@users.noreply.github.com>
1 parent 12a0f01 commit 52540a2

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎Doc/reference/datamodel.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3161,8 +3161,8 @@ behaviour. An example of this can be found in the :mod:`enum` module::
31613161
...
31623162
>>> # Enum classes have a custom metaclass:
31633163
>>> type(Menu)
3164-
<class 'enum.EnumMeta'>
3165-
>>> # EnumMeta defines __getitem__,
3164+
<class 'enum.EnumType'>
3165+
>>> # EnumType defines __getitem__,
31663166
>>> # so __class_getitem__ is not called,
31673167
>>> # and the result is not a GenericAlias object:
31683168
>>> Menu['SPAM']

‎Misc/ACKS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2157,6 +2157,7 @@ Alakshendra Yadav
21572157
Hirokazu Yamamoto
21582158
Masayuki Yamamoto
21592159
Zhikang Yan
2160+
Ali Ömer Yasan
21602161
Jeffrey Yasskin
21612162
Jingchen Ye
21622163
Ka-Ping Yee

0 commit comments

Comments
 (0)