[Python-ideas] OrderedDict literals

Niki Spahiev niki.spahiev at gmail.com
Fri May 9 12:12:02 CEST 2014


Hello,

Currently expression (a=1, b=2) is a syntax error. If it's defined to 
mean (('a',1), ('b',2)) it can be used when making OrderedDict or 
anything that requires named ordered args e.g.

OrderedDict((a=1, b=2))

another variant with more changes in VM is

OrderedDict(**(a=1, b=2))

Niki



More information about the Python-ideas mailing list