mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			324 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			324 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from __future__ import annotations
 | 
						|
from typing import Callable
 | 
						|
 | 
						|
 | 
						|
class A[T, *Ts, **P]:
 | 
						|
    x: T
 | 
						|
    y: tuple[*Ts]
 | 
						|
    z: Callable[P, str]
 | 
						|
 | 
						|
 | 
						|
class B[T, *Ts, **P]:
 | 
						|
    T = int
 | 
						|
    Ts = str
 | 
						|
    P = bytes
 | 
						|
    x: T
 | 
						|
    y: Ts
 | 
						|
    z: P
 | 
						|
 | 
						|
 | 
						|
def generic_function[T, *Ts, **P](
 | 
						|
    x: T, *y: *Ts, z: P.args, zz: P.kwargs
 | 
						|
) -> None: ...
 |