[Python-ideas] An async facade?

Jasper St. Pierre jstpierre at mecheye.net
Sat Dec 22 02:13:48 CET 2012


On Fri, Dec 21, 2012 at 7:50 PM, Guido van Rossum <guido at python.org> wrote:

>
> It's water under the bridge. We have PEP 380 in Python 3.3. I don't
> want to change the language again in 3.4. Maybe after that we can
> reconsider.


One thing I'll say is that I think the coroutine decorator should convert
something like:

    @coroutine
    def blah():
        return "result"

into the generator equivalent. You can do a syntax hack with:

    @coroutine
    def blah():
        if 0: yield
        return "result"

but that feels bad. This sort of bug may seem unlikely, but a user may hit
it if they're commenting out code,

Maybe a generic @force_generator decorator might be useful...

-- 
  Jasper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20121221/c521d8f8/attachment.html>


More information about the Python-ideas mailing list