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 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> References: 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 Makoto Kuwata : > 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