At first, forgive my poor english. I meet a problem. the code like this.
class Mydict(dict):
pass
print id(Mydict({"a": 1, "b": 2}))
print id(Mydict({"a": 1, "b": 2}))
print Mydict({"a": 1, "b": 2}).pop("a")
print id(Mydict({"a": 1, "b": 2}))
output:
>>>139700506146328
>>>139700506146328
>>>1
>>>139700506146328
when I instantiate a class. and, no variable assign the instance. it give me the some physical address.
what does python do when it instantiate? how does it allocate physical address?where can i get some information from ?
my python is Cpython 2.7.11
-----------------------add(2017-09-17) -------
I used pycharm.
in my opinion, it maybe give difference physical address.likes
>>>139700506146312
>>>139700506233123
>>>1
>>>139700506235222