executor.map() TypeError: zip argument #2 must support iteration

iMath redstone-cold at 163.com
Mon Apr 1 00:45:21 EDT 2013


executor.map()    TypeError: zip argument #2 must support iteration

when I run it ,just generated TypeError: zip argument #2 must support iteration.
can anyone help me fix this problem ?

import time, concurrent.futures
lst100=[i for i in range(100)]

t1=time.clock()
print(list(map(str,lst100)))
t2=time.clock()
print(t2-t1)

t3=time.clock()
with concurrent.futures.ThreadPoolExecutor(max_workers=100) as executor:
    future_to_url = executor.map(str,lst100, 60)
    print(list(future_to_url))
t4=time.clock()
print(t4-t3)



More information about the Python-list mailing list