On 2/04/23 6:36 pm, Benedict Verhegghe wrote:
An Enum is functionally a container with a limited set of constants. Why should it not be legitimate to ask for the number of constants in it?

But Enum itself isn't an enum, it's a constructor for enums.
I think len() just happens to work on it as a side effect
of the way enums are implemented.

--
Greg

_______________________________________________
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/6YTC6U27TXS2RA26ZQGLM4AZ3SBHUBR3/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to