importenumclassBase:
def__init__(self, x):
print('In Base init')
raiseValueError("I don't like", x)
classMyEnum(Base, enum.Enum):
A='a'def__init__(self, y):
print('In MyEnum init')
self.y=yMyEnum should not be created because of the exception in Base.__init__.
Linked PRs
MyEnumshould not be created because of the exception inBase.__init__.Linked PRs