Hello! It is correct behaviour for python to call __del__ on some identity of a class object more than once?
In brief I shall describe a situation. Sorry for my english. For debugin purposes I'm put in my module global counters for counting __init__ and __del__ calls. This is a sample code for clearness: ------------------------------------------------------- init_cnt = 0 del_cnt = 0 class foo: def __init__(self): global init_cnt init_cnt += 1 def __del__(self): global del_cnt del_cnt += 1 def stat(): print "init_cnt = %d" % init_cnt print "del_cnt = %d" % del_cnt print "difference = %d" % init_cnt-del_cnt ------------------------------------------------------- And the result of a stat() call in some moment of time looks like so: init_cnt = 6233 del_cnt = 6234 difference = -1 It is __del__ called twice for some instance? Thanks in advance! -- GMT More Then ... -- http://mail.python.org/mailman/listinfo/python-list