Nov. 28, 2020
10:34 p.m.
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