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)
| 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() |