mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
bpo-39231: correct tutorial annotations section (GH-25029)
This commit is contained in:
parent
bacefbf414
commit
a53e9a7cf5
1 changed files with 1 additions and 1 deletions
|
@ -1038,7 +1038,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