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)
| 3055 | return self._return_annotation |
| 3056 | |
| 3057 | def replace(self, *, parameters=_void, return_annotation=_void): |
| 3058 | """Creates a customized copy of the Signature. |
| 3059 | Pass 'parameters' and/or 'return_annotation' arguments |
| 3060 | to override them in the new copy. |
| 3061 | """ |
| 3062 | |
| 3063 | if parameters is _void: |
| 3064 | parameters = self.parameters.values() |
| 3065 | |
| 3066 | if return_annotation is _void: |
| 3067 | return_annotation = self._return_annotation |
| 3068 | |
| 3069 | return type(self)(parameters, |
| 3070 | return_annotation=return_annotation) |
| 3071 | |
| 3072 | __replace__ = replace |
| 3073 |