Skip to content

Commit 566bdc7

Browse files
aliysnmclaude
andcommitted
Docs: Use EnumType instead of EnumMeta in data model example
EnumMeta was renamed to EnumType in Python 3.11 (EnumMeta is kept as an alias), so type(Menu) now shows <class 'enum.EnumType'>. Update the __class_getitem__ example output and the accompanying comment. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 18be993 commit 566bdc7

1 file changed

Lines changed: 2 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']

0 commit comments

Comments
 (0)