Skip to content

Instantly share code, notes, and snippets.

@artemrys
Last active December 22, 2018 18:35
Show Gist options
  • Save artemrys/cbd7b4a27bdee2787f9c5321964113f7 to your computer and use it in GitHub Desktop.
Save artemrys/cbd7b4a27bdee2787f9c5321964113f7 to your computer and use it in GitHub Desktop.
exit_try_except_finally_1.py
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