Fixed two syntax errors in PEP 457.
This commit is contained in:
parent
45d05cbdf7
commit
04283170ab
|
@ -145,7 +145,7 @@ values. Instead, positional-only parameters can be specified
|
|||
in optional "groups". Groups of parameters are surrounded by
|
||||
square brackets, like so::
|
||||
|
||||
def addch([y, x,] ch, [attr], /):
|
||||
def addch([y, x,] ch, [attr,] /):
|
||||
|
||||
Positional-only parameters that are not in an option group are
|
||||
"required" positional-only parameters. All "required" positional-only
|
||||
|
@ -205,7 +205,7 @@ More semantics of positional-only parameters:
|
|||
It's possible to specify a function prototype where the mapping
|
||||
of arguments to parameters is ambiguous. Consider::
|
||||
|
||||
def range([start,] stop, [range], /):
|
||||
def range([start,] stop, [range,] /):
|
||||
|
||||
Python disambiguates these situations by preferring optional groups
|
||||
to the *left* of the required group.
|
||||
|
|
Loading…
Reference in New Issue