Problem of Readability of Python

Brian Elmegaard brian at
Sun Oct 7 22:06:59 CEST 2007

Bruno Desthuilliers <bruno.42.desthuilliers at>

> Use dicts, not lists or tuples:
> a = dict(name='yadda', val=42)
> print a['name']
> print a['val']

I guess you will then need a list or tuple to store the dicts?

I might have made it with a list of class instances:

class a:
    def __init__(self,name,val):

print l[0].name
print l[0].val
Is the dict preferable to a list or tuple of class instances?
Brian (remove the sport for mail)

More information about the Python-list mailing list