f---ing typechecking

Hendrik van Rooyen mail at microcorp.co.za
Wed Feb 21 00:44:08 EST 2007


 "Nick Craig-Wood" <nick at craig-wood.com> wrote:

> 
> Ie
> 
>     x += a
> 
> does not equal
> 
>     x = x + a
> 
> which it really should for all types of x and a

One would hope so , yes.

However, I think that the first form is supposed to update in place, 
while the second is free to bind a new thing to x

> 
> (That is the kind of statement about which I'm sure someone will post
> a perfectly reasonable counterexample ;-)
> 

I don't think its reasonable - its just an accident of implementation..

- Hendrik




More information about the Python-list mailing list