Last active
December 22, 2018 18:35
-
-
Save artemrys/cbd7b4a27bdee2787f9c5321964113f7 to your computer and use it in GitHub Desktop.
exit_try_except_finally_1.py
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
import sys | |
def some_func(): | |
... | |
def _child_process(target): | |
try: | |
target() | |
sys.exit(0) | |
except: | |
print("Exception") | |
sys.exit(1) | |
finally: | |
print("Out") | |
try: | |
_child_process(some_func) | |
finally: | |
print("Out2") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment