10000 gh-95077: [Enum] add code-based deprecation warnings for member.member access by ethanfurman · Pull Request #95083 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-95077: [Enum] add code-based deprecation warnings for member.member access #95083

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 25, 2022
Merged
Prev Previous commit
Next Next commit
remove __getattr__ from docs
  • Loading branch information
ethanfurman committed Jul 21, 2022
commit 6a980de08782b61691a967d464553d26da8573bf
7 changes: 0 additions & 7 deletions Doc/library/enum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,6 @@ Data Types
>>> dir(Color)
['BLUE', 'GREEN', 'RED', '__class__', '__contains__', '__doc__', '__getitem__', '__init_subclass__', '__iter__', '__len__', '__members__', '__module__', '__name__', '__qualname__']

.. method:: EnumType.__getattr__(cls, name)

Returns the Enum member in *cls* matching *name*, or raises an :exc:`AttributeError`::

>>> Color.GREEN
<Color.GREEN: 2>

.. method:: EnumType.__getitem__(cls, name)

Returns the Enum member in *cls* matching *name*, or raises an :exc:`KeyError`::
Expand Down
0