пример:
Код: Выделить всё
A=20
B=20
C=20
print(id(A))
print(id(B))
print(id(C))
#All the objects give me the same reference
#but my class
A= MyClass()
B= MyClass()
C= MyClass()
print(id(A))
print(id(B))
print(id(C))
#All the objects give me difference reference
Подробнее здесь: https://stackoverflow.com/questions/791 ... he-same-va