Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Doc/library/typing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -695,10 +695,10 @@ These can be used as types in annotations using ``[]``, each having a unique syn

from collections.abc import Callable
from threading import Lock
from typing import Any, Concatenate, ParamSpec
from typing import Any, Concatenate, ParamSpec, TypeVar

P = ParamSpec('P')
R = ParamSpec('R')
R = TypeVar('R')

# Use this lock to ensure that only one thread is executing a function
# at any time.
Expand Down
2 changes: 1 addition & 1 deletion Lib/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ def add_two(x: float, y: float) -> float:
args = object()
kwargs = object()

def __init__(self, name, bound=None, covariant=False, contravariant=False):
def __init__(self, name, *, bound=None, covariant=False, contravariant=False):
self.__name__ = name
super().__init__(bound, covariant, contravariant)
try:
Expand Down