class
MyContext:
def __enter__(self):
return
self
def __exit__(self, exc_type, exc_val, exc_tb):
True
with MyContext():
raise ValueError(
"Error"
)