[issue13351] Strange time complexity when creating nested lists

2011-11-05 Thread Jonas LM
New submission from Jonas LM : Consider the following snippets: def lists(n): start_time = time.time() lists = [None]*n for i in xrange(n): lists[i] = [None]*n for j in xrange(n): lists[i][j] = [] print time.time() - start_time def

[issue13351] Strange time complexity when creating nested lists

2011-11-05 Thread Jonas LM
Jonas LM added the comment: Confirmed that this was caused by the garbage collector, as pitrou suspected. Thanks! -- resolution: -> works for me status: open -> closed ___ Python tracker <http://bugs.python.org/i