Re: [Python-Dev] Unexpected increase of globals() refcount

2014-05-23 Thread Benjamin Peterson
On Fri, May 23, 2014, at 8:49, Chandra Srinivasan wrote: > Hi, > I ran the following code in the Python interpreter and am trying to > determine if the behavior I see is expected: > > import sys > print sys.getrefcount(globals()) > class Foo(object): >def __init__(self): > pass > print s

[Python-Dev] Unexpected increase of globals() refcount

2014-05-23 Thread Chandra Srinivasan
Hi, I ran the following code in the Python interpreter and am trying to determine if the behavior I see is expected: import sys print sys.getrefcount(globals()) class Foo(object): def __init__(self): pass print sys.getrefcount(globals()) The first print statement above prints '4' and th