Skip to content

Instantly share code, notes, and snippets.

@artizirk
Created June 5, 2014 11:52
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 artizirk/dda432ffd42427a071e3 to your computer and use it in GitHub Desktop.
Save artizirk/dda432ffd42427a071e3 to your computer and use it in GitHub Desktop.
Function Annotations test
#!/usr/bin/env python3
######################
# Function Annotations test
from pprint import pprint
def greet(name: "User to greet", greeting: "Greeting to use" = "Hello") -> "String with the greeting":
return greeting + " " + name
print(greet("Arti"))
pprint(greet.__annotations__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment