mirror of https://github.com/python/cpython
gh-98602: [typing docs] Use quotes for forward reference in TypeVarTuple example (#98605)
This commit is contained in:
parent
cb95cc24ef
commit
be0cf82ae4
|
@ -1351,7 +1351,7 @@ These are not used in annotations. They are building blocks for creating generic
|
||||||
Shape = TypeVarTuple('Shape')
|
Shape = TypeVarTuple('Shape')
|
||||||
class Array(Generic[*Shape]):
|
class Array(Generic[*Shape]):
|
||||||
def __getitem__(self, key: tuple[*Shape]) -> float: ...
|
def __getitem__(self, key: tuple[*Shape]) -> float: ...
|
||||||
def __abs__(self) -> Array[*Shape]: ...
|
def __abs__(self) -> "Array[*Shape]": ...
|
||||||
def get_shape(self) -> tuple[*Shape]: ...
|
def get_shape(self) -> tuple[*Shape]: ...
|
||||||
|
|
||||||
Type variable tuples can be happily combined with normal type variables::
|
Type variable tuples can be happily combined with normal type variables::
|
||||||
|
|
Loading…
Reference in New Issue