assigning values in __init__
Ben Finney
bignose+hates-spam at benfinney.id.au
Wed Nov 8 20:27:12 EST 2006
John Salerno <johnjsal at NOSPAMgmail.com> writes:
> Ben Finney wrote:
> > If you pass a *mapping* of the
> > "I-might-want-to-add-more-in-the-future" values, then you get both
> > explicit *and* expandable, without an arbitrary unneeded sequence.
>
> Do you mean by using the **kwargs parameter?
No. I mean what I said in this earlier post on this thread:
<URL:http://groups.google.com/group/comp.lang.python/msg/b413bb1f311e7ee1>
If you have a group of named, semantically-related, unsequenced
values, pass them into the function as a mapping object (a dict
object).
--
\ "I have yet to see any problem, however complicated, which, |
`\ when you looked at it in the right way, did not become still |
_o__) more complicated." -- Paul Anderson |
Ben Finney
More information about the Python-list
mailing list