Skip to content

Instantly share code, notes, and snippets.

@Drvanon
Created September 7, 2020 11:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Drvanon/e2f0eb2778752fef1ae7254b0b87fe83 to your computer and use it in GitHub Desktop.
Save Drvanon/e2f0eb2778752fef1ae7254b0b87fe83 to your computer and use it in GitHub Desktop.
def outside_try():
foo = None
try:
foo = load_foo()
except FooLoadingError:
return "Foo failed to load"
# Do all the things
return foo
def inside_try():
try:
foo = load_foo()
# Do all the things
return foo
except FooLoadingError:
return "Foo failed to load"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment