]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45535: Improve output of Enum ``dir()`` (GH-29316)
authorAlex Waygood <Alex.Waygood@Gmail.com>
Thu, 2 Dec 2021 16:49:52 +0000 (16:49 +0000)
committerGitHub <noreply@github.com>
Thu, 2 Dec 2021 16:49:52 +0000 (08:49 -0800)
commitb2afdc95cc8f4e9228148730949a43cef0323f15
tree00f99a2e959b803ee11434f6866215ac63dc90e6
parentcb8f491f46e262549f6c447b31625cab7c20a60a
bpo-45535: Improve output of Enum ``dir()`` (GH-29316)

Modify the ``EnumType.__dir__()`` and ``Enum.__dir__()`` to ensure
that user-defined methods and methods inherited from mixin classes always
show up in the output of `help()`. This change also makes it easier for
IDEs to provide auto-completion.
Doc/howto/enum.rst
Doc/library/enum.rst
Lib/enum.py
Lib/test/test_enum.py
Misc/NEWS.d/next/Library/2021-10-29-16-28-06.bpo-45535.n8NiOE.rst [new file with mode: 0644]