Created
June 5, 2014 11:52
-
-
Save artizirk/dda432ffd42427a071e3 to your computer and use it in GitHub Desktop.
Function Annotations test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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