> Yes, that is correct. Any subclass of Enum will also be a type, and
will have a length.

That is the correct and expected behavior, as described on 
https://docs.python.org/3/library/enum.html

> Yeah, and I'm of the opinion that it's not a problem for Enum to have
zero possible values, but to have the concept of values.

I encountered that Enum having a len hid a mistake on my part. If len(Enum) 
raised, my mistake would be immediately apparent, however at the end of the 
day, my mistake was easily found.

I am using this issue to mostly try how to contribute to Python and I do not 
have strong opinion on this issue either way. IMHO len(Enum) should raise, but 
idk if it is worth potential downstream breakages.
_______________________________________________
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/EJWIJTZSRJEZIGUKZ6PUXOYZWLGXULSE/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to