Skip to content

Commit 94e7d73

Browse files
authored
Use EnumType instead of EnumMeta in enum's examples (#163060)
1 parent d95c6a0 commit 94e7d73

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
@@ -3163,8 +3163,8 @@ behaviour. An example of this can be found in the :mod:`enum` module::
31633163
...
31643164
>>> # Enum classes have a custom metaclass:
31653165
>>> type(Menu)
3166-
<class 'enum.EnumMeta'>
3167-
>>> # EnumMeta defines __getitem__,
3166+
<class 'enum.EnumType'>
3167+
>>> # EnumType defines __getitem__,
31683168
>>> # so __class_getitem__ is not called,
31693169
>>> # and the result is not a GenericAlias object:
31703170
>>> Menu['SPAM']

‎Misc/ACKS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2163,6 +2163,7 @@ Alakshendra Yadav
21632163
Hirokazu Yamamoto
21642164
Masayuki Yamamoto
21652165
Zhikang Yan
2166+
Ali Ömer Yasan
21662167
Jeffrey Yasskin
21672168
Jingchen Ye
21682169
Ka-Ping Yee

0 commit comments

Comments
 (0)