Created
October 16, 2020 17:22
-
-
Save PharaohKJ/8d7928096b42ab6181ba18fceba19fdb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from contextlib import contextmanager | |
@contextmanager | |
def context(): | |
print("enter") | |
try: | |
print("try") | |
yield | |
except Exception as e: | |
print("except") | |
raise e | |
else: | |
print("else") | |
finally: | |
print("finally") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment