Good note!
On Wed, Oct 17, 2012 at 7:55 PM, Serhiy Storchaka wrote:
> On 16.10.12 15:58, Antoine Pitrou wrote:
>>
>> Adding an "url" attribute here looks a bit ugly to me. Why not use a
>> dict comprehension for future_to_url?
>
>
> This is especially ugly after implementing PEP 412 (Key-Sharing
On 16.10.12 15:58, Antoine Pitrou wrote:
Adding an "url" attribute here looks a bit ugly to me. Why not use a
dict comprehension for future_to_url?
This is especially ugly after implementing PEP 412 (Key-Sharing Dictionary).
___
Python-Dev mailing l
> + url = future_to_url[url]
url = future_to_url[future]
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive
On Tue, Oct 16, 2012 at 10:58 PM, Antoine Pitrou wrote:
> Adding an "url" attribute here looks a bit ugly to me. Why not use a
> dict comprehension for future_to_url?
No reason other than the fact it didn't occur to me to do so. Fixed :)
Cheers,
Nick.
--
Nick Coghlan | ncogh...@gmail.com
On Tue, 16 Oct 2012 14:51:21 +0200 (CEST)
nick.coghlan wrote:
>
> + # We can use a with statement to ensure threads are cleaned up promptly
> with concurrent.futures.ThreadPoolExecutor(max_workers=5) as executor:
> - future_to_url = dict((executor.submit(load_url, url, 60), url)
> -