Skip to content

Commit a3148dc

Browse files
author
Guido van Rossum
committed
Clarify that TypeVar constraints must be 2 or more. Also make the next paragraph normative.
Fixes issue #82.
1 parent dba1e0d commit a3148dc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pep-0484.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,10 @@ The function ``concat`` can be called with either two ``str`` arguments
303303
or two ``bytes`` arguments, but not with a mix of ``str`` and ``bytes``
304304
arguments.
305305

306-
Note that subtypes of types constrained by a type variable are treated
306+
There should be at least two constraints, if any; specifying a single
307+
constraint is disallowed.
308+
309+
Subtypes of types constrained by a type variable should be treated
307310
as their respective explicitly listed base types in the context of the
308311
type variable. Consider this example::
309312

0 commit comments

Comments
 (0)