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~ _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/PHFBAFQJOSDAIY4LK3OOG7B3O3IO5HOO/ Code of Conduct: http://python.org/psf/codeofconduct/