MCPcopy Index your code
hub / github.com/python/cpython / _is_param_expr

Function _is_param_expr

Lib/_collections_abc.py:516–526  ·  view source on GitHub ↗

Checks if obj matches either a list of types, ``...``, ``ParamSpec`` or ``_ConcatenateGenericAlias`` from typing.py

(obj)

Source from the content-addressed store, hash-verified

514 return _CallableGenericAlias(Callable, tuple(new_args))
515
516def _is_param_expr(obj):
517 """Checks if obj matches either a list of types, ``...``, ``ParamSpec`` or
518 ``_ConcatenateGenericAlias`` from typing.py
519 """
520 if obj is Ellipsis:
521 return True
522 if isinstance(obj, list):
523 return True
524 obj = type(obj)
525 names = ('ParamSpec', '_ConcatenateGenericAlias')
526 return obj.__module__ == 'typing' and any(obj.__name__ == name for name in names)
527
528
529class Callable(metaclass=ABCMeta):

Callers 3

__new__Method · 0.70
__repr__Method · 0.70
__reduce__Method · 0.70

Calls 1

anyFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…