Skip to content

Commit 4109619

Browse files
authored
PEP 483: Fix an example (#2143)
The body of one of the examples mistakenly used different names than the parameters given in the function signature.
1 parent 7d90a86 commit 4109619

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pep-0483.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ replaced by the most-derived base class among ``t1``, etc. Examples:
486486
Note that the type checker will reject this function::
487487

488488
def concat(first: U, second: U) -> U:
489-
return x + y # Error: can't concatenate str and bytes
489+
return first + second # Error: can't concatenate str and bytes
490490

491491
For such cases where parameters could change their types only simultaneously
492492
one should use constrained type variables.

0 commit comments

Comments
 (0)