Why is the id of a Python class not unique when called quickly?

前端 未结 6 1166
花落未央
花落未央 2020-11-22 15:29

I\'m doing some things in Python (3.3.3), and I came across something that is confusing me since to my understanding classes get a new id each time they are called.

6条回答
  •  忘掉有多难
    2020-11-22 16:21

    It's releasing the first instance since it wasn't retained, then since nothing has happened to the memory in the meantime, it instantiates a second time to the same location.

提交回复
热议问题