1- from typing import builtinclass , Iterable , Iterator , Generic , TypeVar , List , Mapping , overload , Tuple
1+ from typing import builtinclass , Iterable , Iterator , TypeVar , List , Mapping , overload , Tuple , Set , Union
22
33@builtinclass
44class object :
@@ -11,7 +11,7 @@ class type:
1111class tuple : pass
1212class function : pass
1313
14- def isinstance (x : object , t : type ) -> bool : pass
14+ def isinstance (x : object , t : Union [ type , Tuple ] ) -> bool : pass
1515
1616@builtinclass
1717class int :
@@ -27,18 +27,24 @@ T = TypeVar('T')
2727KT = TypeVar ('KT' )
2828VT = TypeVar ('VT' )
2929
30- class list (Iterable [T ], Generic [ T ] ):
30+ class list (Iterable [T ]):
3131 def __iter__ (self ) -> Iterator [T ]: pass
3232 def __mul__ (self , x : int ) -> list [T ]: pass
3333 def __setitem__ (self , x : int , v : T ) -> None : pass
3434 def __getitem__ (self , x : int ) -> T : pass
3535 def __add__ (self , x : List [T ]) -> T : pass
3636
37- class dict (Iterable [KT ], Mapping [KT , VT ], Generic [ KT , VT ] ):
37+ class dict (Iterable [KT ], Mapping [KT , VT ]):
3838 @overload
3939 def __init__ (self , ** kwargs : VT ) -> None : pass
4040 @overload
4141 def __init__ (self , arg : Iterable [Tuple [KT , VT ]], ** kwargs : VT ) -> None : pass
4242 def __setitem__ (self , k : KT , v : VT ) -> None : pass
4343 def __iter__ (self ) -> Iterator [KT ]: pass
4444 def update (self , a : Mapping [KT , VT ]) -> None : pass
45+
46+ class set (Iterable [T ]):
47+ def __iter__ (self ) -> Iterator [T ]: pass
48+ def add (self , x : T ) -> None : pass
49+ def discard (self , x : T ) -> None : pass
50+ def update (self , x : Set [T ]) -> None : pass
0 commit comments