Skip to content

Instantly share code, notes, and snippets.

@camelcaseblog
Last active July 14, 2019 05:59
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 camelcaseblog/f034b381da279841d38f428c0d957a7f to your computer and use it in GitHub Desktop.
Save camelcaseblog/f034b381da279841d38f428c0d957a7f to your computer and use it in GitHub Desktop.
try:
ratio = a / b
except ZeroDivisionError:
ratio = float(‘inf’)
except TypeError as e:
logger.critical(‘Got TypeError: %s’, e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment