Re: why python cache the string 256?

2009-10-27 Thread Gabriel Genellina
En Mon, 26 Oct 2009 23:42:54 -0300, s7v7nislands s7v7nisla...@gmail.com escribió: On Oct 27, 4:03 am, Diez B. Roggisch de...@nospam.web.de wrote: s7v7nislands schrieb: test.py #!/usr/bin/python a = [] for i in xrange(100): a.append('a'*500) $python -i test.py #virt mem

Re: why python cache the string 256?

2009-10-26 Thread Diez B. Roggisch
s7v7nislands schrieb: hi all: test.py #!/usr/bin/python a = [] for i in xrange(100): a.append('a'*500) $python -i test.py #virt mem 514m in top output del a #virt mem 510m why python cache these string? In source, I see when object size

Re: why python cache the string 256?

2009-10-26 Thread s7v7nislands
On Oct 27, 4:03 am, Diez B. Roggisch de...@nospam.web.de wrote: s7v7nislands schrieb: hi all: test.py #!/usr/bin/python a = [] for i in xrange(100):     a.append('a'*500) $python -i test.py     #virt mem 514m in top output del a                   #virt mem 510m why