Class or Dictionary?

Miki Tebeka miki.tebeka at gmail.com
Fri Feb 11 19:48:43 CET 2011


> I have a series of parameter values which i need to pass throughout my
> code (>100), in C I would use a structure for example. However in
> python it is not clear to me if it would be better to use a dictionary
> or build a class object?
namedtuple can be a quick and easy solution for you.
http://docs.python.org/dev/library/collections.html#collections.namedtuple

HTH
--
Miki Tebeka <miki.tebeka at gmail.com>
http://pythonwise.blogspot.com



More information about the Python-list mailing list