Hi all. Im working through a database tutorial in a book called Core Python
Applications. On page 290 it asks of me to install something though its not
clear what it is. I think it has to do with SQLAlchemy. It says if you use
Python 3 you'll need to get distribute first. You'll need a web brows
On 28/02/13 13:27, DoanVietTrungAtGmail wrote:
Dear tutors
My function below simply populates a large dict. When measured by timeit
populating 10 million items once, versus populating 1 million items ten
times, the times are noticeably different:
I cannot replicate your results. When I try it,
On 28/02/13 02:27, DoanVietTrungAtGmail wrote:
---
import timeit
N = 1000 # This constant's value is either 10 million or 1 million
testDict = {}
def writeDict(N):
for i in xrange(N):
testDict[i] = [i, [i + 1, i + 2], i + 3]
print timeit.Timer('f(N)', 'from __main__ import N,