
Aug. 14, 2023
5:18 p.m.
In addition to this, there's nothing wrong with defining additional behavior on class objects. They're just objects. The pattern of class objects acting as containers of registered instances is used in many places, and it makes perfect sense here IMO. On Tue, Apr 4, 2023, at 2:54 PM, Ethan Furman wrote:
Enums are not like any other type in a multitude of ways: `__len__`, `__contains__`, `__getitem__`, etc. Special-casing only `Enum`, `IntEnum`, `StrEnum`, and every other base enum (i.e. no members), would be like special-casing empty lists, empty dicts, empty tuples, etc.
-- ~Ethan~