Unit function to construct new ``IO`` values. Is the same as regular constructor: .. code:: python >>> from returns.io import IO >>> assert IO(1) == IO.from_value(1) Part of the :class:`returns.interfaces.applicative.ApplicativeN` inte
(cls, inner_value: _NewValueType)
| 178 | |
| 179 | @classmethod |
| 180 | def from_value(cls, inner_value: _NewValueType) -> 'IO[_NewValueType]': |
| 181 | """ |
| 182 | Unit function to construct new ``IO`` values. |
| 183 | |
| 184 | Is the same as regular constructor: |
| 185 | |
| 186 | .. code:: python |
| 187 | |
| 188 | >>> from returns.io import IO |
| 189 | >>> assert IO(1) == IO.from_value(1) |
| 190 | |
| 191 | Part of the :class:`returns.interfaces.applicative.ApplicativeN` |
| 192 | interface. |
| 193 | """ |
| 194 | return IO(inner_value) |
| 195 | |
| 196 | @classmethod |
| 197 | def from_io(cls, inner_value: 'IO[_NewValueType]') -> 'IO[_NewValueType]': |