Pythonic style involves lots of lightweight classes (for me)

bayerj bayerj at in.tum.de
Thu Dec 14 10:41:14 EST 2006


Hi,

I think that tuples are the best and simplest approach for small
structures.

>>> songs = [("Paranoid", "http://..."), ("Christian Woman", "http://...")]
>>> for title, url in songs:
...  print "%s: %s" % (title, url)
...
Paranoid: http://...
Christian Woman: http://...

I think that python's unpacking and builtin data types very useful. I
prefer it a lot to over-object-oriented-programming.




More information about the Python-list mailing list