assigning values in __init__
John Salerno
johnjsal at NOSPAMgmail.com
Tue Nov 7 14:12:53 EST 2006
John Salerno wrote:
> Is this a good way to assign the values to the different attributes?
> Should 'stats' be a list/tuple (like this), or should I do *stats instead?
Thanks guys! The main suggestion seems to be to use setattr(), so I
might give that a try. But I do like Steve's suggestion that it's better
to be explicit about each attribute, instead of just accepting a list of
numbers (but I can't help but feel that for some reason this is better,
because it's more general). We shall see! :)
More information about the Python-list
mailing list