Skip to content

Instantly share code, notes, and snippets.

@tsuyoshicho
Created November 9, 2020 13:37
Show Gist options
  • Save tsuyoshicho/838a5b26bac72ec02eb1cb45028c2b95 to your computer and use it in GitHub Desktop.
Save tsuyoshicho/838a5b26bac72ec02eb1cb45028c2b95 to your computer and use it in GitHub Desktop.
# vim: fileencoding=utf-8
def errorget():
raise BaseException(2)
def main():
i = 1
try:
res = errorget()
except BaseException as e:
i = e
finally:
pass
print(i)
if __name__ == '__main__':
main()
@tsuyoshicho
Copy link
Author

result:

2

*** time: 0.051244 ***

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment