[Python-ideas] Ordered Dictionary Literals
Antoine Pitrou
solipsis at pitrou.net
Thu Nov 12 17:46:26 CET 2009
More information about the Python-ideas mailing list
Thu Nov 12 17:46:26 CET 2009
- Previous message: [Python-ideas] Ordered Dictionary Literals
- Next message: [Python-ideas] Ordered Dictionary Literals
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Richard Saunders <richismyname at ...> 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 :)
- Previous message: [Python-ideas] Ordered Dictionary Literals
- Next message: [Python-ideas] Ordered Dictionary Literals
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-ideas mailing list