mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
bpo-39231: correct tutorial annotations section (GH-25029)
(cherry picked from commit a53e9a7cf5)
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
This commit is contained in:
parent
c84e769c2b
commit
7990072999
1 changed files with 1 additions and 1 deletions
|
|
@ -866,7 +866,7 @@ function. Parameter annotations are defined by a colon after the parameter name
|
|||
by an expression evaluating to the value of the annotation. Return annotations are
|
||||
defined by a literal ``->``, followed by an expression, between the parameter
|
||||
list and the colon denoting the end of the :keyword:`def` statement. The
|
||||
following example has a positional argument, a keyword argument, and the return
|
||||
following example has a required argument, an optional argument, and the return
|
||||
value annotated::
|
||||
|
||||
>>> def f(ham: str, eggs: str = 'eggs') -> str:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue