PEP 646: Add forgotten parameter name in examples (#2837)
This commit is contained in:
parent
71daa07244
commit
759a6bd547
|
@ -1180,7 +1180,7 @@ We can attach names to each parameter using normal type variables:
|
|||
K = TypeVar('K')
|
||||
N = TypeVar('N')
|
||||
|
||||
def matrix_vector_multiply(x: Array[K, N], Array[N]) -> Array[K]: ...
|
||||
def matrix_vector_multiply(x: Array[K, N], y: Array[N]) -> Array[K]: ...
|
||||
|
||||
a: Array[Literal[64], Literal[32]]
|
||||
b: Array[Literal[32]]
|
||||
|
@ -1255,7 +1255,7 @@ without knowing the type ahead of time. For example, we can still write:
|
|||
K = TypeVar('K')
|
||||
N = TypeVar('N')
|
||||
|
||||
def matrix_vector_multiply(x: Array[K, N], Array[N]) -> Array[K]: ...
|
||||
def matrix_vector_multiply(x: Array[K, N], y: Array[N]) -> Array[K]: ...
|
||||
|
||||
We can then use this with:
|
||||
|
||||
|
|
Loading…
Reference in New Issue