[Python-ideas] async/await in Python

Ludovic Gasc gmludo at gmail.com
Mon Apr 20 00:03:08 CEST 2015


Maybe we should forget ORM special use-case, and think more generally about
the problem behind that:

What's the problem ? It's impossible to use yield from / await on magic
methods like __getattr__ or __init__
We could follow the same semantic as described in this PEP:  __agetattr__
or __ainit__

But:
1. I've no idea if it's possible to implement that in CPython's internals
and in others Python implementations.
2. At least to me, this feature should be another PEP, we have enough
changes in this PEP.
3. Do we need to implement that ? Even if, personally, I don't use ORMs
when I interact with databases, I've the feeling that this feature should
be interesting, at least to show that async pattern is a first-class
citizen in Python.
--
Ludovic Gasc (GMLudo)
http://www.gmludo.eu/

2015-04-19 21:42 GMT+02:00 Antoine Pitrou <solipsis at pitrou.net>:

> On Sun, 19 Apr 2015 19:35:20 +0000
> Nicholas Chammas
> <nicholas.chammas at gmail.com> wrote:
> > Is Mike Bayer
> > <
> http://techspot.zzzeek.org/2015/02/15/asynchronous-python-and-databases/>
> > on this list? Just curious as a n00b observer if he has thoughts on this
> > new PEP, since we are talking about SQLAlchemy.
>
> This new PEP doesn't bring anything new to the table on the topic. Mike
> Bayer's article is still perfectly applicable in a "await / async"
> world.
>
> Regards
>
> Antoine.
>
>
> _______________________________________________
> 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/20150420/ef46f253/attachment-0001.html>


More information about the Python-ideas mailing list