Skip to content

Instantly share code, notes, and snippets.

@sepulchered
Created November 7, 2017 20:50
Show Gist options
  • Save sepulchered/b67cc22e51a0cd016dfcd5dcac4cf919 to your computer and use it in GitHub Desktop.
Save sepulchered/b67cc22e51a0cd016dfcd5dcac4cf919 to your computer and use it in GitHub Desktop.
import typing
def divide(num: float, den: float) -> typing.Optional[float]:
return num / den
print(divide(1, 2))
print(divide(1, 0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment