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/2002-March/021877.html below:

Evil Trashcan and GC interaction

[Python-Dev] Re: Evil Trashcan and GC interaction [Python-Dev] Re: Evil Trashcan and GC interactionBarry A. Warsaw barry@zope.com
Thu, 28 Mar 2002 13:42:12 -0500
>>>>> "NS" == Neil Schemenauer <nas@python.ca> writes:

    NS> There is insidious bug here.  Andrew helped me walk through it
    NS> and I think we figured it out.  First here's the code to
    NS> trigger it:

A simpler example:

    import gc

    class Ouch:
	def __del__(self):
	    gc.collect()

    def f():
	gc.set_threshold(5)
	while 1:
	    t = () # <-- here
	    for i in range(300):
		t = [t, Ouch()]
    f()

-Barry



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