The HowTo page says here that super().__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 for Enum.__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 to Enum.__new__, saying that calling super().__new__ inside user-defined __new__ functions is forbidden.
Linked PRs
The HowTo page says here that
super().__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 for
Enum.__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 to
Enum.__new__, saying that callingsuper().__new__inside user-defined__new__functions is forbidden.Linked PRs