besmarts.core.returns module

besmarts.core.returns

should be using this with compute!

besmarts.core.returns.fail(value: T = None, out='', err='', t0=None)[source]

Indicate a failed function call

Parameters: value : T

The return value of the underlying function call

outstr

The output of the function

errstr

The errors of the function

Returns:

The return object with a status set to fail

Return type:

return_value

class besmarts.core.returns.return_status(*values)[source]

Bases: Enum

FAIL = 1
NONE = None
SUCCESS = 0
class besmarts.core.returns.return_value(value: T, out: str, err: str, status: return_status)[source]

Bases: Generic[T]

besmarts.core.returns.success(value: T = None, out='', err='', t0=None)[source]

Indicate a successful function call

Parameters: value : T

The return value of the underlying function call

outstr

The output of the function

errstr

The errors of the function

Returns:

The return object with a status set to success

Return type:

return_value