Home
last modified time | relevance | path

Searched refs:GenericAlias (Results 1 – 25 of 34) sorted by relevance

12

/third_party/python/Lib/
D_collections_abc.py12 GenericAlias = type(list[int]) variable
119 __class_getitem__ = classmethod(GenericAlias)
180 __class_getitem__ = classmethod(GenericAlias)
268 __class_getitem__ = classmethod(GenericAlias)
402 __class_getitem__ = classmethod(GenericAlias)
416 class _CallableGenericAlias(GenericAlias):
436 return GenericAlias(origin, args)
483 if isinstance(obj, GenericAlias):
810 __class_getitem__ = classmethod(GenericAlias)
Dqueue.py220 __class_getitem__ = classmethod(types.GenericAlias)
322 __class_getitem__ = classmethod(types.GenericAlias)
Dtyping.py29 from types import WrapperDescriptorType, MethodWrapperType, MethodDescriptorType, GenericAlias
169 if isinstance(obj, types.GenericAlias):
192 if isinstance(t, (_GenericAlias, GenericAlias)):
284 if isinstance(t, (_GenericAlias, GenericAlias)):
288 if isinstance(t, GenericAlias):
289 return GenericAlias(t.__origin__, ev_args)
758 elif isinstance(arg, (_GenericAlias, GenericAlias)):
1466 if isinstance(t, GenericAlias):
1470 return GenericAlias(t.__origin__, stripped_args)
1490 if isinstance(tp, (_BaseGenericAlias, GenericAlias)):
[all …]
D_weakrefset.py6 from types import GenericAlias
202 __class_getitem__ = classmethod(GenericAlias)
Dcontextlib.py7 from types import MethodType, GenericAlias
19 __class_getitem__ = classmethod(GenericAlias)
41 __class_getitem__ = classmethod(GenericAlias)
Dfilecmp.py16 from types import GenericAlias
251 __class_getitem__ = classmethod(GenericAlias)
Dfileinput.py76 from types import GenericAlias
395 __class_getitem__ = classmethod(GenericAlias)
Dfunctools.py22 from types import GenericAlias
415 __class_getitem__ = classmethod(GenericAlias)
980 __class_getitem__ = classmethod(GenericAlias)
Dtempfile.py646 __class_getitem__ = classmethod(_types.GenericAlias)
832 __class_getitem__ = classmethod(_types.GenericAlias)
Dtypes.py296 GenericAlias = type(list[int]) variable
Ddataclasses.py10 from types import GenericAlias
288 __class_getitem__ = classmethod(GenericAlias)
Dos.py31 GenericAlias = type(list[int]) variable
1079 __class_getitem__ = classmethod(GenericAlias)
Ddifflib.py35 from types import GenericAlias
695 __class_getitem__ = classmethod(GenericAlias)
Dmailbox.py21 from types import GenericAlias
264 __class_getitem__ = classmethod(GenericAlias)
2021 __class_getitem__ = classmethod(GenericAlias)
Dsubprocess.py454 __class_getitem__ = classmethod(types.GenericAlias)
998 __class_getitem__ = classmethod(types.GenericAlias)
/third_party/python/Lib/test/
Dtest_genericalias.py35 from types import GenericAlias, MappingProxyType, AsyncGeneratorType
167 a = types.GenericAlias(list, int)
272 alias = GenericAlias(list, T)
307 GenericAlias(bad=float)
310 class SubClass(GenericAlias): ...
312 class Bad(GenericAlias):
330 self.assertIsInstance(alias, GenericAlias)
Dtest_genericclass.py272 from _testcapi import Generic, GenericAlias
273 self.assertIsInstance(Generic.__class_getitem__(int), GenericAlias)
276 self.assertIs(type(IntGeneric), GenericAlias)
/third_party/python/Doc/library/
Dtypes.rst245 .. class:: GenericAlias(t_origin, t_args)
254 >>> from types import GenericAlias
256 >>> list[int] == GenericAlias(list, (int,))
258 >>> dict[str, int] == GenericAlias(dict, (str, int))
/third_party/python/Lib/concurrent/futures/
Dthread.py60 __class_getitem__ = classmethod(types.GenericAlias)
D_base.py548 __class_getitem__ = classmethod(types.GenericAlias)
/third_party/python/Lib/multiprocessing/
Dqueues.py380 __class_getitem__ = classmethod(types.GenericAlias)
Dshared_memory.py532 __class_getitem__ = classmethod(types.GenericAlias)
/third_party/python/Lib/http/
Dcookies.py423 __class_getitem__ = classmethod(types.GenericAlias)
/third_party/python/Lib/ctypes/
D__init__.py454 __class_getitem__ = classmethod(_types.GenericAlias)
/third_party/python/Lib/urllib/
Dparse.py183 __class_getitem__ = classmethod(types.GenericAlias)

12