Pythonic gui format?

Atanas Banov enterr at gmail.com
Tue Feb 14 17:42:00 EST 2006


ever considered doing the mapping this way?

window = [
  ["item", {'k1': 'v1', 'k2': 'v2'],
  ["otheritem", {'k1n': 'v1n', 'k2n': 'v2n'}]
]

it is as simple as it gets: for 1:1 mapping from XML, list of
Attributes becomes py List.
the list of Properties of an attribute becomes a py Dictionary

ps. you can do tuples instead of lists if immutable is ok.




More information about the Python-list mailing list