Re:Why Python is Slow: Looking Under the Hood
by dekhn on Friday May 09, 2014 @12:47PM
(#7721837)
And 110 is probably an interned int, so a and b are likely referencing an object that was compiled into the interpreter.
[ Parent
| on HN ]
Re:Why Python is Slow: Looking Under the Hood
by icebraining on Friday May 09, 2014 @12:57PM
(#7721883)
Yeap:
>>> a = 110
>>> b = 110
>>> id(a) == id(b)
True[deleted]
Re:Why Python is Slow: Looking Under the Hood
by icebraining on Friday May 09, 2014 @01:40PM
(#7722170)
Uh, I didn't use assignment between variables; my code is the same as your second example (both variables independently assigned to 110).