[Python-ideas] async/await in Python

Yury Selivanov yselivanov.ml at gmail.com
Sun Apr 19 21:29:53 CEST 2015


Hi Antoine,

On 2015-04-19 3:23 PM, Antoine Pitrou wrote:
> On Sun, 19 Apr 2015 15:06:31 -0400
> Yury Selivanov <yselivanov.ml at gmail.com>
> wrote:
>> Hi Antonie,
> (OT: It's Antoine, not "Antonie")
I apologize for misspelling your name.  Sorry.


Anyways, my only intent when I was replying to your last
email was to show you, that it is possible to develop
an ORM where queries do not occur at random places
because of __getattr__/iteration.

If you want to have ORM and asyncio and avoid using
greenlets, then you have several problems to solve:

1. Queries in getattr -- that's possible it you always
describe the shape of data you want.  If you later
access some attribute that wasn't fetched -- you get
an error.

2. Sane syntax for transaction managers, session
managers and connection pools.  Of course you can
use 'yield from', 'try' and 'finally' right now.

3. San syntax for iteration.  You can use 'while True'
but it's not elegant.

Thank you,
Yury


More information about the Python-ideas mailing list