On 23 November 2017 at 12:42, Ivan Levkivskyi <levkivskyi at gmail.com> wrote: >> See e.g. http://www.tornadoweb.org/en/stable/gen.html >> > > 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? Because yield expressions in comprehensions are difficult to understand, and the loop form is easy to understand? :-) (Certainly I didn't find the explanation in that page confusing, I don't know if I'd have found a comprehension form confusing, but I suspect I might have...) Paul
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