Whats new in Python 3: concurrent-futures example error?
Paddy
paddy3118 at googlemail.com
Tue Feb 22 04:45:35 EST 2011
I just noted the example here:
http://docs.python.org/dev/whatsnew/3.2.html#pep-3148-the-concurrent-futures-module
import concurrent.futures, shutil
with concurrent.futures.ThreadPoolExecutor(max_workers=4) as e:
e.submit(shutil.copy, 'src1.txt', 'dest1.txt')
e.submit(shutil.copy, 'src2.txt', 'dest2.txt')
e.submit(shutil.copy, 'src3.txt', 'dest3.txt')
e.submit(shutil.copy, 'src3.txt', 'dest4.txt')
Should the last line show a copy of src4.txt rather than src3.txt
going to dest4.txt?
- Paddy.
More information about the Python-list
mailing list