MCPcopy Index your code
hub / github.com/RustPython/RustPython / replace

Method replace

Lib/inspect.py:2749–2765  ·  view source on GitHub ↗

Creates a customized copy of the Parameter.

(self, *, name=_void, kind=_void,
                annotation=_void, default=_void)

Source from the content-addressed store, hash-verified

2747 return self._kind
2748
2749 def replace(self, *, name=_void, kind=_void,
2750 annotation=_void, default=_void):
2751 """Creates a customized copy of the Parameter."""
2752
2753 if name is _void:
2754 name = self._name
2755
2756 if kind is _void:
2757 kind = self._kind
2758
2759 if annotation is _void:
2760 annotation = self._annotation
2761
2762 if default is _void:
2763 default = self._default
2764
2765 return type(self)(name, kind, default=default, annotation=annotation)
2766
2767 def __str__(self):
2768 return self._format()

Calls

no outgoing calls