Multikey Dict?
Scott David Daniels
scott.daniels at acm.org
Sun Nov 13 08:17:44 EST 2005
David Rasmussen wrote:
> If I have a collection of dicts like:
>
> john = {'id': 1, 'name': "John Cleese", 'year': 1939}
> graham = {'id': 2, 'name': "Graham Chapman", 'year': 1941}
If these are all like that, I prefer:
john = dict(id=1, name="John Cleese", year=1939}
graham = dict{id-2, name="Graham Chapman", year=1941}
--Scott David Daniels
scott.daniels at acm.org
More information about the Python-list
mailing list