blob: cb0135c8b3aa6d012d9814169d349613e4aeff76 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
class CtxMgr:
def __enter__(self):
print("__enter__")
return self
def __exit__(self, a, b, c):
print("__exit__", repr(a), repr(b))
def foo():
with CtxMgr():
return 4
print(foo())
|