Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
The HowTo page sayshere thatsuper().__new__ should not be called in user-defined__new__ methods of an Enum (subclass), along with a short explanation for why it is the case.
But this is a hard limitation, not a bonus explanation. When I tried using the super, I ended up with an exception I didn't understand and the doc entry forEnum.__new__ didn't help me at all as per why that was failing.
The explanation should probably remain in the howto page, but a similar red warning should be added toEnum.__new__, saying that callingsuper().__new__ inside user-defined__new__ functions is forbidden.