[PEP 203] Augmented Assignment

Frank Niessink frankn=nuws at cs.vu.nl
Tue Aug 15 12:44:02 EDT 2000


Frank Niessink <frankn=nuws at cs.vu.nl> wrote:

> Maybe a stupid question, but why is there no hook for the regular
> assignment in this proposal? The proposal talks about 12 assignment 
> operators, of which 11 are 'inplace' and 1 regular. But there is
> no hook for the regular assignment. If a hook would be created for 
> regular assignment the object can decide what happens if something is
> assigned to it.

> Silly example: 

[snip]

Now I remember where this also might be useful: when using Tkinter.
The silly IntVar and StringVar (and set() and get()) always annoyed me. 
With __assign__ at least the set and get methods wouldn't be needed 
anymore.

Cheers, Frank

-- 
Infinite: Bigger than the biggest thing ever and then some. Much bigger than
that in fact, really amazingly immense, a totally stunning size, "wow, that's
big", time. Infinity is just so big that by comparison, bigness itself looks 
really titchy. Gigantic multiplied by colossal multiplied by staggeringly huge
is the sort of concept we're trying to get across here.
	-- Douglas Adams, 'The Restaurant at the End of the Universe'



More information about the Python-list mailing list