Support for async with
#1179
Labels
component:basilisp.core
Issue pertaining to basilisp.core namespace
issue-type:enhancement
New feature or request
Hi,
Python provides async with to with asynchronous context managers, it's like async but for asynchronous operations
For example, given the below file defining and calling
with
on an async context managerawith.py
the output is
> python .\awith.py Entering Inside Exiting
A simple
with
of course won't work in Basilispissuefor.lpy
it throws an error
A naive work around is to directly call the manager enter/exit functions:
Could support for
async with
be added? One possible approach might be to specify an:async
meta key in thewith
metadata, as in(^:async with [...] ...)
.Thanks
The text was updated successfully, but these errors were encountered: