[Python-ideas] return from (was Re: Tail recursion elimination)
Jonathan Slenders
jonathan at slenders.be
Tue Jan 21 08:27:52 CET 2014
No I didn't. Those examples that I wrote are equivalent, except that the
second will miss a frame on the stack.
2014/1/21 Greg Ewing <greg.ewing at canterbury.ac.nz>
> Jonathan Slenders wrote:
>
> @coroutine
>> def a():
>> return (yield from b())
>>
>> You could write it as:
>>
>> def a():
>> return b()
>>
>
> I'm guessing you mean
>
> def a():
> return from b()
>
> but that wouldn't be a coroutine, because it doesn't
> contain a 'yield' anywhere.
>
> --
> Greg
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140121/86b299fc/attachment.html>
More information about the Python-ideas
mailing list