MCPcopy Index your code
hub / github.com/RustPython/RustPython / ContextManager

Class ContextManager

extra_tests/snippets/syntax_async.py:6–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4
5
6class ContextManager:
7 async def __aenter__(self):
8 print("Entrada")
9 ls.append(1)
10 return 1
11
12 def __str__(self):
13 ls.append(2)
14 return "c'est moi!"
15
16 async def __aexit__(self, exc_type, exc_val, exc_tb):
17 ls.append(3)
18 print("Wiedersehen")
19
20
21class AIterWrap:

Callers 1

aFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected