Skip to content

Commit

Permalink
bpo-46269: [Enum] remove special-casing of __new__ in `EnumType.__d…
Browse files Browse the repository at this point in the history
…ir__` (GH-30421)
  • Loading branch information
sobolevn committed Jan 5, 2022
1 parent 43aac29 commit 817a6bc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 0 additions & 4 deletions Lib/enum.py
Expand Up @@ -652,10 +652,6 @@ def __dir__(self):
# if and only if they have been user-overridden
enum_dunders = set(filter(_is_dunder, enum_dict))

# special-case __new__
if self.__new__ is not first_enum_base.__new__:
add_to_dir('__new__')

for cls in mro:
# Ignore any classes defined in this module
if cls is object or is_from_this_module(cls):
Expand Down
@@ -0,0 +1 @@
Remove special-casing of ``__new__`` in :meth:`enum.Enum.__dir__`.

0 comments on commit 817a6bc

Please sign in to comment.