direct initialization of class attributes vs. declarations w/in __init__

Diez B. Roggisch deets at nospam.web.de
Sun Jun 11 18:13:53 EDT 2006


> No need to be obnoxious. I do appreciate your efforts to help, but you
> must admit, your last statement is a bit snide and certainly not
> useful.
 > I'm telling you that the code runs differently on my laptop.

It certainly doesn't. There is absolutely no imaginable way how this 
behavior could be different, even if the python versions would differ 
considerably. Apart from quantum-fluctuations. Or other SciFi voodoo.

> Why this is, I don't know any more /or/ less than you do apparently.

Frederik (as one of the most profiled python developers out there) might 
not be the most amicable of posters, but he certainly is not wrong when 
it comes to the most basic parts of python's semantics.

> Now, it is of course possible that I'm interpreting the results
> incorrectly, but that doesn't change the fact that I'm getting
> different results per computer with identical code.

It is NOT identical code, otherwise you won't see different
results. It might be code from which you _believe_ it is identical, and 
the difference might be subtle to see. But if you'd store it in a file, 
execute on your laptop, use an usb-stick and then transfer it to 
whatever the other machine of yours is, it will yield the exact same 
results.

Diez



More information about the Python-list mailing list