On 07/29/2016 08:01 AM, Martin Teichmann wrote:
... Also, while researching other people's code when I wrote PEP 487, I couldn't find any such code elsewhere, yet I found a lot of code where people took the wildest measure to prevent a metaclass in doing its job on the first class it is used for. One example is enum.EnumMeta, which contains code not to make enum.Enum an enum ...
Actually, enum.Enum is an enum. The guards are there because part of creating a new Enum class is searching for the previous Enum classes, and of course the very first time through there is no previous Enum class. My apologies if I have misunderstood what you were trying to say. -- ~Ethan~ _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com