[Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library
Barry Warsaw
barry at python.org
Thu Apr 25 23:17:24 CEST 2013
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
More information about the Python-Dev
mailing list