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

Function _signature_from_builtin

Lib/inspect.py:2297–2310  ·  view source on GitHub ↗

Private helper function to get signature for builtin callables.

(cls, func, skip_bound_arg=True)

Source from the content-addressed store, hash-verified

2295
2296
2297def _signature_from_builtin(cls, func, skip_bound_arg=True):
2298 """Private helper function to get signature for
2299 builtin callables.
2300 """
2301
2302 if not _signature_is_builtin(func):
2303 raise TypeError("{!r} is not a Python builtin "
2304 "function".format(func))
2305
2306 s = getattr(func, "__text_signature__", None)
2307 if not s:
2308 raise ValueError("no signature found for builtin {!r}".format(func))
2309
2310 return _signature_fromstr(cls, func, s, skip_bound_arg)
2311
2312
2313def _signature_from_function(cls, func, skip_bound_arg=True,

Callers 1

_signature_from_callableFunction · 0.85

Calls 3

_signature_is_builtinFunction · 0.85
_signature_fromstrFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…