assigning values in __init__
bignose+hates-spam at benfinney.id.au
Tue Nov 7 23:45:07 CET 2006
John Salerno <johnjsal at NOSPAMgmail.com> writes:
> 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).
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.
\ "He may look like an idiot and talk like an idiot but don't let |
`\ that fool you. He really is an idiot." -- Groucho Marx |
More information about the Python-list