MCPcopy Index your code
hub / github.com/dry-python/returns / from_io

Method from_io

returns/io.py:197–209  ·  view source on GitHub ↗

Unit function to construct new ``IO`` values from existing ``IO``. .. code:: python >>> from returns.io import IO >>> assert IO(1) == IO.from_io(IO(1)) Part of the :class:`returns.interfaces.specific.IO.IOLikeN` interface.

(cls, inner_value: 'IO[_NewValueType]')

Source from the content-addressed store, hash-verified

195
196 @classmethod
197 def from_io(cls, inner_value: 'IO[_NewValueType]') -> 'IO[_NewValueType]':
198 """
199 Unit function to construct new ``IO`` values from existing ``IO``.
200
201 .. code:: python
202
203 >>> from returns.io import IO
204 >>> assert IO(1) == IO.from_io(IO(1))
205
206 Part of the :class:`returns.interfaces.specific.IO.IOLikeN` interface.
207
208 """
209 return inner_value
210
211 @classmethod
212 def from_ioresult(

Callers 3

bind_ioMethod · 0.45
test_inner_valueFunction · 0.45
test_inner_valueFunction · 0.45

Calls

no outgoing calls

Tested by 2

test_inner_valueFunction · 0.36
test_inner_valueFunction · 0.36