On 11/25/20 2:19 AM, Ben Avrahami wrote:
All too often I see the following pattern in asyncio 3rd-party libs,
either in their own source code or in the inusage:
```
inst = SomeClass()
await inst.initialize()
```
[...] allowing simply for `instance = await
SomeClass()`. In classes of `AsyncType`, the __new__ and __init__
methods must be async methods (returning coroutines).
I like the idea in principle but I don't currently use any async
libraries so my opinion may not count much here. ;)
--
David Foster | Seattle, WA, USA
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/UQFOOGBQJOF7EES46NWEO5WV4QZOHREM/
Code of Conduct: http://python.org/psf/codeofconduct/