
Nov. 12, 2009
4:46 p.m.
Richard Saunders <richismyname@...> writes:
Basically, the thought was there might be a place for a slightly better literal for OrderedDict in Python 3.0 od = OrderedDict([('a',1),('b':2)]) # seems clumsy
How about something like: od = OrderedDict.from_literal(""" {'a': 1, 'b': 2} """) Of course, you need to hook/reimplement a full-blown parser :)