Skip to content

Instantly share code, notes, and snippets.

@maxsnew
Created February 20, 2018 19:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save maxsnew/fa0e9f32682f80e514b7a09b673704d1 to your computer and use it in GitHub Desktop.
When should the type error happen?
def print_upper(s : str):
up_s = s.upper()
def printer(n : int):
acc = ""
for i in range(0,n):
acc += up_s
return acc
return printer
def print_upper(s : str):
def printer(n : int):
up_s = s.upper()
acc = ""
for i in range(0,n):
acc += up_s
return acc
return printer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment