I really confuse that a behavior of id() function on IronPython who differ from Python. Let me show you the following code,
In IronPython:
>> s = "hello"
>> a = len(s)
>> id(a)
44
>> a = len(s)
>> id(a)
45
As you can see that, id()'s result is changed in every calls. In Python, however, not be changed.
In Python:
>> s = "hello"
>> a = len(s)
>> id(a)
2633845
>> a = len(s)
>> id(a)
2633845
I know id() function returns an object identification number(ID) of its single parameter. Why does two python interpreters give me a different result?