We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d975b23 commit 3fb47d1Copy full SHA for 3fb47d1
docs/source/cheat_sheet.rst
@@ -24,6 +24,7 @@ Built-in types
24
# For simple built-in types, just use the name of the type.
25
x = 1 # type: int
26
x = 1.0 # type: float
27
+ x = True # type: bool
28
x = "test" # type: str
29
x = u"test" # type: unicode
30
@@ -61,6 +62,11 @@ Functions
61
62
"""Your function docstring goes here after the type definition."""
63
return str(num)
64
65
+ # This function has no parameters and also returns nothing. Annotations
66
+ # can also be placed on the same line as their function headers.
67
+ def greet_world(): # type: () -> None
68
+ print "Hello, world!"
69
+
70
# And here's how you specify multiple arguments.
71
def plus(num1, num2):
72
# type: (int, int) -> int
0 commit comments