[Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library

Glenn Linderman v+python at g.nevcal.com
Fri Apr 26 05:39:24 CEST 2013


On 4/25/2013 8:22 PM, Greg wrote:
> On 26/04/2013 3:12 p.m., Glenn Linderman wrote:
>> On 4/25/2013 7:49 PM, Nick Coghlan wrote:
>
>>> You couldn't create an enum of callables, but that would be a
>>> seriously weird thing to do anyway....
>>
>> But aren't all classes callable?
>
> An enum of classes would be seriously weird as well, I think.
>
Perhaps so, but an enumeration of objects whose class defines __call__ 
would not be so weird.

Does your __methods__ cure this problem? It looked interesting to me, 
but I'm not familiar enough with metaclass to be sure of anything about 
it :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20130425/5264e262/attachment.html>


More information about the Python-Dev mailing list