[prev in list] [next in list] [prev in thread] [next in thread]
List: python-list
Subject: Re: assigning values in __init__
From: John Salerno <johnjsal () NOSPAMgmail ! com>
Date: 2006-11-07 19:12:53
Message-ID: 4550daa6$0$26446$c3e8da3 () news ! astraweb ! com
[Download RAW message or body]
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! :)
--
http://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic