Kristján Valur Jónsson <krist...@ccpgames.com> added the comment: Hi, as I stated, the original patch was simply our original implementation. Here is a new patch. It is simpler: 1) it exposes a gc.callbacks list where users can register themselves, in the spirit of sys.meta_path 2) One can have multiple callbacks 3) Improve error handling 4) The callback is called with a "phase" argument, currently 0 for start, and 1 for the end.
Let's start bikeshedding the calling signature. I like having a single callback, since multiple callables are a nuisance to manage. Once we agree, I'll post a patch for the documentation, and unittests. ---------- Added file: http://bugs.python.org/file19884/gccallback2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10576> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com