[Python-ideas] Re: Conditions for a coherent MI relationship [was Re: Re: mro and super don't feel so pythonic]

2022-04-26 Thread malmiteria
Steven D'Aprano writes: > It just means that Python > handles more cases than Eiffel or C++ Does C++ or Eiffel ban some class inheritance tree like python does? I can't find sources on that, although, i didn't spend an hour looking for it. But if not, i would say that python handle less cases than

[Python-ideas] Enum should use __class_getitem__

2022-04-26 Thread Stefan Nelson-Lindall
EnumMeta implements its own __getitem__ function which doesn't respect __class_getitem__. Now that __class_getitem__ exists, this behavior feels unintuitive. For instance ``` class Directions(enum.Enum): LEFT = "LEFT" RIGHT = "RIGHT" def __class_getitem__(cls, name): return super().__cl