A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-September/009118.html below:

DEBUG_SAVEALL feature for gc not in 2.0b1?

[Python-Dev] Re: DEBUG_SAVEALL feature for gc not in 2.0b1? [Python-Dev] Re: DEBUG_SAVEALL feature for gc not in 2.0b1?Neil Schemenauer nascheme@enme.ucalgary.ca
Fri, 1 Sep 2000 16:10:32 -0600
On Fri, Sep 01, 2000 at 11:47:59PM +0200, Vladimir Marangozov wrote:
> By putting them in gc.collected_garbage. The next collect() should be
> able to empty this list if the DEBUG_SAVEALL flag is not set. Do you
> see any problems with this?

I don't really see the point.  If someone has set the SAVEALL flag then
they are obviously debugging a program.  I don't see much point
in the GC cleaning up this garbage.  The user can do it if they like.

I have an idea for an alternate interface.  What if there was a
gc.handle_garbage hook which could be set to a function?  The collector
would pass garbage objects to this function one at a time.  If the
function returns true then it means that the garbage was handled and the
collector should not call tp_clear.  These handlers could be chained
together like import hooks.  The default handler would simply append to
the gc.garbage list.  If a debugging flag was set then all found garbage
would be passed to this function rather than just uncollectable garbage.

Skip, would a hook like this be useful to you?

  Neil



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4