[Python-ideas] Dict literal use for custom dict classes

Niki Spahiev niki.spahiev at gmail.com
Wed Dec 16 07:38:59 EST 2015


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