Whats new in Python 3: concurrent-futures example error?

Terry Reedy tjreedy at udel.edu
Tue Feb 22 17:25:03 CET 2011


On 2/22/2011 4:45 AM, Paddy wrote:
> 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?

I assume so. Changed in the repository.

-- 
Terry Jan Reedy




More information about the Python-list mailing list