/third_party/python/Doc/c-api/ |
D | typehints.rst | 9 two types exist -- :ref:`GenericAlias <types-genericalias>` and 10 :ref:`Union <types-union>`. Only ``GenericAlias`` is exposed to C. 14 Create a :ref:`GenericAlias <types-genericalias>` object. 16 :class:`types.GenericAlias`. The *origin* and *args* arguments set the 17 ``GenericAlias``\ 's ``__origin__`` and ``__args__`` attributes respectively. 24 The ``GenericAlias``\ 's ``__parameters__`` attribute is constructed lazily 45 :class:`types.GenericAlias` in Python.
|
/third_party/python/Lib/test/ |
D | test_genericalias.py | 36 from types import GenericAlias, MappingProxyType, AsyncGeneratorType 168 a = types.GenericAlias(list, int) 273 alias = GenericAlias(list, T) 289 alias = GenericAlias(origin, T) 327 GenericAlias(bad=float) 330 class SubClass(GenericAlias): ... 332 class Bad(GenericAlias):
|
D | test_genericclass.py | 272 from _testcapi import Generic, GenericAlias 273 self.assertIsInstance(Generic.__class_getitem__(int), GenericAlias) 276 self.assertIs(type(IntGeneric), GenericAlias)
|
/third_party/python/Lib/ |
D | _collections_abc.py | 12 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): 537 if isinstance(obj, GenericAlias): 863 __class_getitem__ = classmethod(GenericAlias)
|
D | queue.py | 220 __class_getitem__ = classmethod(types.GenericAlias) 322 __class_getitem__ = classmethod(types.GenericAlias)
|
D | typing.py | 31 from types import WrapperDescriptorType, MethodWrapperType, MethodDescriptorType, GenericAlias 192 if isinstance(obj, types.GenericAlias): 217 if isinstance(t, (_GenericAlias, GenericAlias, types.UnionType)): 327 if isinstance(t, (_GenericAlias, GenericAlias, types.UnionType)): 331 if isinstance(t, GenericAlias): 332 return GenericAlias(t.__origin__, ev_args) 1057 elif isinstance(arg, (_GenericAlias, GenericAlias, types.UnionType)): 1866 if isinstance(t, GenericAlias): 1870 return GenericAlias(t.__origin__, stripped_args) 1897 if isinstance(tp, (_BaseGenericAlias, GenericAlias, [all …]
|
D | functools.py | 22 from types import GenericAlias 416 __class_getitem__ = classmethod(GenericAlias) 743 and not isinstance(typ, GenericAlias) 842 return isinstance(cls, type) and not isinstance(cls, GenericAlias) 992 __class_getitem__ = classmethod(GenericAlias)
|
D | _weakrefset.py | 6 from types import GenericAlias 206 __class_getitem__ = classmethod(GenericAlias)
|
D | contextlib.py | 7 from types import MethodType, GenericAlias 19 __class_getitem__ = classmethod(GenericAlias) 41 __class_getitem__ = classmethod(GenericAlias)
|
D | types.py | 85 if isinstance(base, type) and not isinstance(base, GenericAlias): 300 GenericAlias = type(list[int]) variable
|
D | filecmp.py | 16 from types import GenericAlias 255 __class_getitem__ = classmethod(GenericAlias)
|
D | fileinput.py | 70 from types import GenericAlias 415 __class_getitem__ = classmethod(GenericAlias)
|
D | dataclasses.py | 11 from types import FunctionType, GenericAlias 232 if isinstance(self.type, type) and not isinstance(self.type, GenericAlias): 312 __class_getitem__ = classmethod(GenericAlias) 1214 cls = obj if isinstance(obj, type) and not isinstance(obj, GenericAlias) else type(obj)
|
D | tempfile.py | 678 __class_getitem__ = classmethod(_types.GenericAlias) 861 __class_getitem__ = classmethod(_types.GenericAlias)
|
D | os.py | 31 GenericAlias = type(list[int]) variable 1085 __class_getitem__ = classmethod(GenericAlias)
|
D | difflib.py | 35 from types import GenericAlias 663 __class_getitem__ = classmethod(GenericAlias)
|
/third_party/python/Doc/library/ |
D | types.rst | 293 .. class:: GenericAlias(t_origin, t_args) 302 >>> from types import GenericAlias 304 >>> list[int] == GenericAlias(list, (int,)) 306 >>> dict[str, int] == GenericAlias(dict, (str, int))
|
/third_party/python/Lib/concurrent/futures/ |
D | thread.py | 66 __class_getitem__ = classmethod(types.GenericAlias)
|
D | _base.py | 557 __class_getitem__ = classmethod(types.GenericAlias)
|
/third_party/python/Misc/NEWS.d/ |
D | 3.10.0a3.rst | 17 ``types.GenericAlias`` will now raise a ``TypeError`` when attempting to 178 :class:`types.GenericAlias` objects can now be the targets of weakrefs. 237 Allow ``GenericAlias`` objects to use :ref:`union type expressions 240 fixes union type expressions not de-duplicating ``GenericAlias`` objects.
|
D | 3.10.1.rst | 176 Fix deepcopying of :class:`types.GenericAlias` objects. 368 :class:`types.GenericAlias` instance as a base. 378 :class:`types.GenericAlias`. 895 Amend the docs on ``GenericAlias`` objects to clarify that non-container
|
/third_party/python/Lib/multiprocessing/ |
D | queues.py | 380 __class_getitem__ = classmethod(types.GenericAlias)
|
D | shared_memory.py | 532 __class_getitem__ = classmethod(types.GenericAlias)
|
/third_party/python/Lib/http/ |
D | cookies.py | 423 __class_getitem__ = classmethod(types.GenericAlias)
|
/third_party/python/Lib/ctypes/ |
D | __init__.py | 454 __class_getitem__ = classmethod(_types.GenericAlias)
|