Fixed two syntax errors in PEP 457.

This commit is contained in:
Larry Hastings 2013-10-09 02:20:56 +02:00
parent 45d05cbdf7
commit 04283170ab
1 changed files with 2 additions and 2 deletions

View File

@ -145,7 +145,7 @@ values. Instead, positional-only parameters can be specified
in optional "groups". Groups of parameters are surrounded by in optional "groups". Groups of parameters are surrounded by
square brackets, like so:: 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 Positional-only parameters that are not in an option group are
"required" positional-only parameters. All "required" positional-only "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 It's possible to specify a function prototype where the mapping
of arguments to parameters is ambiguous. Consider:: 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 Python disambiguates these situations by preferring optional groups
to the *left* of the required group. to the *left* of the required group.