Skip to content

Commit 233f5bd

Browse files
committed
Update TypeVar documentation
1 parent 9cf4f76 commit 233f5bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/source/generics.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ this is correct for ``concat``, since ``concat`` actually returns a
209209
>>> print(type(ss))
210210
<class 'str'>
211211
212-
You can also use a ``TypeVar`` with ``values`` when defining a generic
213-
class. For example, mypy uses the type ``typing.Pattern[AnyStr]`` for the
214-
return value of ``re.compile``, since regular expressions can be based
215-
on a string or a bytes pattern.
212+
You can also use a ``TypeVar`` with a restricted set of possible
213+
values when defining a generic class. For example, mypy uses the type
214+
``typing.Pattern[AnyStr]`` for the return value of ``re.compile``,
215+
since regular expressions can be based on a string or a bytes pattern.

0 commit comments

Comments
 (0)