[issue10576] Add a progress callback to gcmodule

Jim Jewett report at bugs.python.org
Mon Nov 29 21:47:04 CET 2010

Jim Jewett <jimjjewett at users.sourceforge.net> added the comment:

I like the idea, but I do quibble with the signature.  As nearly as I can tell, you're assuming

(a)  Only one callback.  I would prefer a sequence of callbacks, to make cooperation easier.  (This does mean you would need a callback removal, instead of just setting it to None.)

(b)  The callback will be called once before collecting generations, and once after (with the number of objects that weren't collected).  Should these be separate callbacks, rather than the same one with a boolean?  And why does it need the number of uncollected objects?  (This might be a case where Practicality Beats Purity, but it is worth documenting.)

nosy: +jimjjewett

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list