Composes failed container with a pure function to modify failure. .. code:: python >>> from returns.io import IOFailure >>> assert IOFailure(1).alt(float) == IOFailure(1.0)
(
self,
function: Callable[[_ErrorType_co], _NewErrorType],
)
| 520 | """ |
| 521 | |
| 522 | def alt( |
| 523 | self, |
| 524 | function: Callable[[_ErrorType_co], _NewErrorType], |
| 525 | ) -> 'IOResult[_ValueType_co, _NewErrorType]': |
| 526 | """ |
| 527 | Composes failed container with a pure function to modify failure. |
| 528 | |
| 529 | .. code:: python |
| 530 | |
| 531 | >>> from returns.io import IOFailure |
| 532 | >>> assert IOFailure(1).alt(float) == IOFailure(1.0) |
| 533 | |
| 534 | """ |
| 535 | return self.from_result(self._inner_value.alt(function)) |
| 536 | |
| 537 | def lash( |
| 538 | self, |
nothing calls this directly
no test coverage detected