[Tutor] garbage collecting

Steven D'Aprano steve at pearwood.info
Wed Jan 8 13:36:51 CET 2014


On Wed, Jan 08, 2014 at 12:43:06PM +0100, spir wrote:

> [Just wildly guessing, don't know your app & code. Can you reduce it to a 
> minimal still manifesting similar bug?]

Try (or rather, *don't* try):

import sys
list(range(sys.maxsize))

That ought to do it :-)


(Note: depending on your operating system, that may simply fail with 
MemoryError, or lock up your computer. Don't blame me for any data loss 
or inconvenience if you try it.)


-- 
Steven


More information about the Tutor mailing list