[Python-ideas] Ordered Dictionary Literals

MRAB python at mrabarnett.plus.com
Wed Nov 11 20:39:37 CET 2009


Terry Reedy wrote:
> Richard Saunders wrote:
>>
>> Hey All,
>>
>> We were exploring new features of Python 3.0 at our Tucson User's Group
> 
> You should actually be using 3.1 if you are not.
> 
> 
>> The two ideas floated were:
>>   od = ['a':1, 'b':2, 'c':3]    # [ ] imply order, the ':' implies 
>> key-value
> 
> Interesting idea, but this would mean making ordered dict a fundamental 
> builtin type that all implementations must include rather than a 
> somewhat optional module import. I do not think it qualifies, at least 
> not yet.
>>
>> or
>>
>>   od = o{'a':1, 'b':2, 'c':3}   # { } imply dict, o implies order
>>
>> Apologies if this is the wrong place for this discussion.
> 
> Perfect place for such idea.
> 
This was discussed in mid June. Guido said -100.



More information about the Python-ideas mailing list