f---ing typechecking

Neil Cerutti horpner at yahoo.com
Wed Feb 21 08:00:09 EST 2007


On 2007-02-21, Hendrik van Rooyen <mail at microcorp.co.za> wrote:
>  "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..

Yup. It's analogous to the way you can do hill-starts with a
manual transmission, but not with an automatic transmission.

-- 
Neil Cerutti



More information about the Python-list mailing list