Adds support for "async with" via #1818

This commit is contained in:
jerluc committed 2021-11-16 13:00:24 -08:00
1 parent 42c5276e04
commit 8847848a03
2 files changed
+26

No files matched your search

+19
View File
@@ -105,3 +105,22 @@ async def f():
f = await C().async_for_classmethod()
#? C()
f
class AsyncCtxMgr:
def some_method():
pass
async def __aenter__(self):
return self
async def __aexit__(self, *args):
pass
async def asyncctxmgr():
async with AsyncCtxMgr() as acm:
#? AsyncCtxMgr()
acm
#? ['some_method']
acm.som