is there a difference between one line and many lines

vino19 vinograd19 at gmail.com
Thu Apr 21 11:55:52 CEST 2011


Sure, I understand that "is" is not "==", cause "is" just compares id(a)==id(b).

I have a win32 CPython and the range of "singletons" is from -5 to 256 on my machine. 

I am asking about what happens in Python interpreter? Why is there a difference between running one line like "a=1;b=1" and two lines like "a=1 \n b=1"? Does it decide to locate memory in different types depend on a code?

Thanks



More information about the Python-list mailing list