>> Currently class instances can not
>> directly be created asyncronously.

> Right now, "await obj" checks for an __await__ method.
> Adding __ainit__ in the mix, with unclear semantics,
> would only complicate things and make a negative
> performance impact.
> Yury

Thanks Yury for the explanation.
Then, instead of "await" we need something like

aobj = ainit AClass()

However, I'm not sure if its proper.

Anyway, there is also an unsettled discussion
for async C++ styles. Once you go ahead
with "await" prefixes, this results in
"two replicated code islands" with approximately
same content but one with "await" s and the other
with plain old style. So there is also a search
for async approach without specific keywords.
So, the moral of the story is additional
keywords are bad.

While this is not directly related to my
request for __ainit__, it is an other view
about the unsettled state of the async
programming in general. And it is not specific
to python.

Regards,
Imran

Reply via email to