Label-Value (was: Re: Inheriting the @ sign from Ruby)

Daniel Wood daniel at cs.washington.edu
Tue Dec 12 15:05:52 EST 2000


"Fredrik Lundh" <fredrik at effbot.org> writes:
> 
> lambda is a reserved word, so I doubt that's what you're
> doing.  Let's call it "spam" instead.

Oops.  I was just making up an example for the post and lambda was the
first parameter that came to mind.

> Besides being a syntax error, it doesn't look very Pythonic
> to me.  If you want to change a named value, the best way
> is to make it an attribute of a class.

Hmmm, I'm open to the suggestion that I need to rethink my plan at a
larger scale, but isn't a mutable int likely to sometimes be useful?
(Just like a mutable list is sometimes useful.)  And if so, is [ 2 ]
the currently favored idiom?  (And if so, isn't there something
better?)

Thanks,
Daniel.



More information about the Python-list mailing list