
April 2, 2023
5:18 p.m.
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