Large integer objects are not reused by the interpreter, so you get two different objects:
>>> a = 11111
>>> b = 11111
>>> id(a)
40351656
>>> id(b)
40351704
sys.getrefcount (11111) always returns the same number, since it measures the number of references to a new object.
For small integers, Python always uses the same object:
>>> sys.getrefcount(1)
73
Usually you should get only one link to a new object:
>>> sys.getrefcount(object())
1
Python , , - .
C : http://svn.python.org/view/python/trunk/Objects/intobject.c?view=markup
: , , , , , :
print sys.getrefcount('foo1111111111111' + 'bar1111111111111')
print sys.getrefcount(111111111111 + 2222222222222)
print sys.getrefcount('foobar333333333333333333')