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

2013年4月25日 14:19:18 -0700

On Apr 25, 2013, at 01:18 PM, Ethan Furman wrote:
>> Ignore the single argument call syntax for Enums please. As Eli pointed
>> out, you have getitem syntax for this and the single argument call syntax
>> is deprecated. It will be removed in a future version of flufl.enum and
>> need not appear in stdlib enum. TOOWTDI.
>
>For me, the getitem syntax on a class seems odd and the call syntax is
>TOOWTDI.
Not if you think of it as a lookup operation instead of an instantiation
operation. It really is the former because neither syntax creates new enum
item objects, it just returns an already existing one.
-Barry
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to