R
raffaele ponzini
Dear all,
I have a question concerning the output of the id() function.
In particular since is should:
""
Return the identity of an object. This is guaranteed to be unique among
simultaneously existing objects. (Hint: it's the object's memory address.)
""
i expect that for two differnt objects it returns two differnt adress in memory.
Let's seee a correct case:9986060
And now a strange (for me) output:#here i'm assingning a integer value to a fresh new variable d without
any kind of
#link to the variable a
9986060
But if I chose as a value another number (a big one, let say 1e10) I
get what I will expect also in the case of the chose of the integer 10
showed above:
can you please explain me the reasion of this strange behaviour.
Thanks,
I have a question concerning the output of the id() function.
In particular since is should:
""
Return the identity of an object. This is guaranteed to be unique among
simultaneously existing objects. (Hint: it's the object's memory address.)
""
i expect that for two differnt objects it returns two differnt adress in memory.
Let's seee a correct case:9986060
And now a strange (for me) output:#here i'm assingning a integer value to a fresh new variable d without
any kind of
#link to the variable a
9986060
But if I chose as a value another number (a big one, let say 1e10) I
get what I will expect also in the case of the chose of the integer 10
showed above:
can you please explain me the reasion of this strange behaviour.
Thanks,