[Python-checkins] [Enum] Remove redundant check for existing members. (GH-92590)

ethanfurman webhook-mailer at python.org
Mon May 9 22:41:05 EDT 2022


https://github.com/python/cpython/commit/5be069568ddbce1d50f785426e6b6c2b82957f70
commit: 5be069568ddbce1d50f785426e6b6c2b82957f70
branch: main
author: Ethan Furman <ethan at stoneleaf.us>
committer: ethanfurman <ethan at stoneleaf.us>
date: 2022-05-09T19:40:42-07:00
summary:

[Enum] Remove redundant check for existing members. (GH-92590)

files:
M Lib/enum.py

diff --git a/Lib/enum.py b/Lib/enum.py
index b9811fe9e6787..1df38a6f7e5f5 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -1024,9 +1024,6 @@ def _get_mixins_(mcls, class_name, bases):
         """
         if not bases:
             return object, Enum
-
-        mcls._check_for_existing_members_(class_name, bases)
-
         # ensure final parent class is an Enum derivative, find any concrete
         # data type, and check that Enum has no members
         first_enum = bases[-1]



More information about the Python-checkins mailing list