Skip to content

Tag: reference

Confused with reference count of objects in Python

I’m a little confused with the reference counts I see from my test code When I run my code in both python2 and python3, it shows the reference count is off by 1. Where did the extra reference count come from? So what happened? Why is it off by 1? Where did the extra count come from? Answer Did you