Closed rafguns closed 1 year ago
Is it useful if we're able to write:
async with DOIDownloader() as client: ...
This is more complex than simply replacing __enter__ and __exit__ with __aenter__ and __aexit__; I got an error that __await__ was also expected? To investigate further.
__enter__
__exit__
__aenter__
__aexit__
__await__
I probably did something wrong the previous time (most likely forgot an await somewhere). This seems to work now in branch 'asynccontextmgr'.
await
Is it useful if we're able to write:
This is more complex than simply replacing
__enter__
and__exit__
with__aenter__
and__aexit__
; I got an error that__await__
was also expected? To investigate further.