gh-108682: [Enum] raise TypeError if super().__new__ called in custom __new__ (GH-108704)
When overriding the `__new__` method of an enum, the underlying data type should be created directly; i.e. .
member = object.__new__(cls)
member = int.__new__(cls, value)
member = str.__new__(cls, value)
Calling `super().__new__()` finds the lookup version of `Enum.__new__`, and will now raise an exception when detected. E
Ethan Furman committed
d48760b2f1e28dd3c1a35721939f400a8ab619b8
Parent: 13a0007
Committed by GitHub <noreply@github.com>
on 8/31/2023, 7:45:12 PM