You can test this code: import time
def test(n):
m = 10
vals = []
keys = []
for i in xrange(m):
vals.append(i)
keys.append('a%s'%i)
d = None
for i in xrange(n):
d = dict(zip(keys, vals))
return d
if __name__ == '__main__':
st = time.time()
print test(1000000)
print 'use:', time.time() - st
--
HomePage: cat.appspot.com
_______________________________________________ pypy-dev mailing list [email protected] http://mail.python.org/mailman/listinfo/pypy-dev
