What is considered an "advanced" topic in Python?

Ethan Furman ethan at stoneleaf.us
Fri May 29 17:44:07 EDT 2015


On 05/29/2015 02:28 PM, Jason Swails wrote:

> ​[...] e.g., if the person creating an Enum subclass didn't bother to correctly
> implement [...] __iter__, and __len__ for their subclass

For __iter__ and __len__ to work on the Enum /class/ it must be defined in the metaclass.

--
~Ethan~



More information about the Python-list mailing list