Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #76292
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Marko Rauhamaa <marko@pacujo.net> |
| Newsgroups | comp.lang.python |
| Subject | Re: [Q] is 'yield from' syntax sugar for 'for'+'yield'? |
| Date | Thu, 14 Aug 2014 13:32:05 +0300 |
| Organization | A noiseless patient Spider |
| Lines | 17 |
| Message-ID | <87oavntl96.fsf@elektro.pacujo.net> (permalink) |
| References | <CAFTm5Ru8nfNt2UtyeBiEh-7Cf5RQZShYV9ha=6HACifCcVUG4w@mail.gmail.com> <CAPTjJmo-0aqxeosa1bM=jtuAdwoZLiiG20kDp7RGvP3Zx65_9w@mail.gmail.com> <mailman.12990.1408010368.18130.python-list@python.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Injection-Info | mx05.eternal-september.org; posting-host="ff5cf27ef3d5b31f034d3b72bdc27a41"; logging-data="27143"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ADnmo54TJCad6mC2x/rkK" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
| Cancel-Lock | sha1:91vAbAUMrId+vfypWDLPyI8L5cU= sha1:voqfYQUgJZT2vYomWEY3z34jIDM= |
| Xref | csiph.com comp.lang.python:76292 |
Show key headers only | View raw
Makoto Kuwata <kwatch@gmail.com>: > Thank you. It seems too complicated... I recommend you stop trying to associate the "old" yield with the "new" yield. Asyncio coroutines "abuse" "yield from" for a specific effect. The classic purpose of "yield" was to spoonfeed a sequence of return values to the caller. The coroutine meaning of "yield from" has nothing whatsoever to do about delivering computation results; instead, it denotes a state where a blocking operation is waited for and the control is handed off to other activities. Marko
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [Q] is 'yield from' syntax sugar for 'for'+'yield'? Makoto Kuwata <kwatch@gmail.com> - 2014-08-14 18:59 +0900 Re: [Q] is 'yield from' syntax sugar for 'for'+'yield'? Marko Rauhamaa <marko@pacujo.net> - 2014-08-14 13:32 +0300
csiph-web