Le 23/11/2017 à 13:42, Ivan Levkivskyi a écrit : > > Great, so I open this page and see this code: > > results = [] > for future in list_of_futures: > results.append(yield future) > > Interesting, why don't they use a comprehension for this and instead > need to invent a whole `tornado.gen.multi` function? 1) because it schedules the yielded coroutines in parallel (the "for" loop isn't strictly equivalent, as AFAIU it would schedule the coroutines serially) 2) because it accepts an optional argument to quiet some exceptions Regards Antoine.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4