MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / replace

Method replace

tools/python-3.11.9-amd64/Lib/inspect.py:3023–3036  ·  view source on GitHub ↗

Creates a customized copy of the Signature. Pass 'parameters' and/or 'return_annotation' arguments to override them in the new copy.

(self, *, parameters=_void, return_annotation=_void)

Source from the content-addressed store, hash-verified

3021 return self._return_annotation
3022
3023 def replace(self, *, parameters=_void, return_annotation=_void):
3024 """Creates a customized copy of the Signature.
3025 Pass 'parameters' and/or 'return_annotation' arguments
3026 to override them in the new copy.
3027 """
3028
3029 if parameters is _void:
3030 parameters = self.parameters.values()
3031
3032 if return_annotation is _void:
3033 return_annotation = self._return_annotation
3034
3035 return type(self)(parameters,
3036 return_annotation=return_annotation)
3037
3038 def _hash_basis(self):
3039 params = tuple(param for param in self.parameters.values()

Callers

nothing calls this directly

Calls 2

typeClass · 0.50
valuesMethod · 0.45

Tested by

no test coverage detected