这段程序会输出什么?
Python
class Gate:
def __enter__(self):
print("enter")
return 7
def __exit__(self, exc_type, exc_value, traceback):
print("exit", exc_type.__name__)
return exc_type is LookupError
with Gate() as value:
print(value)
raise LookupError("missing")
print("after")