Skip to content

Commit b70daf6

Browse files
author
Guido van Rossum
committed
Show syntax for functions with many args.
1 parent 3fb47d1 commit b70daf6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/source/cheat_sheet.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,17 @@ Functions
8989
yield i
9090
i += 1
9191
92+
# There's alternative syntax for functions with many arguments.
93+
def send_email(address, # type: Union[str, List[str]]
94+
sender, # type: str
95+
cc, # type: Optional[List[str]]
96+
bcc, # type: Optional[List[str]]
97+
subject='',
98+
body=None # type: List[str]
99+
):
100+
# type: (...) -> bool
101+
<code>
102+
92103
93104
When you're puzzled or when things are complicated
94105
**************************************************

0 commit comments

Comments
 (0)