utils.output module

utils.output.DEFAULT_OUTPUT(msg: str) → None

Prints a message in the error output.

Parameters:msg – the message
Example:
>>> raise_stderr("Hello")
Hello  # in red
utils.output.raise_assertion_error(msg: str) → None[source]

Raises an assertion error with given message.

Parameters:msg – the message
Raises:AssertionError
Example:
>>> raise_assertion_error("Hello")
AssertionError: Hello
utils.output.raise_stderr(msg: str) → None[source]

Prints a message in the error output.

Parameters:msg – the message
Example:
>>> raise_stderr("Hello")
Hello  # in red
utils.output.raise_stdout(msg: str) → None[source]

Prints a message in the standard output.

Parameters:msg – the message
Example:
>>> raise_stdout("Hello")
Hello
utils.output.raise_type_error(msg: str) → None[source]

Raises a type error with given message.

Parameters:msg – the message
Raises:TypeError
Example:
>>> raise_type_error("Hello")
TypeError: Hello
utils.output.raise_warning(msg: str) → None[source]

Raises a warning with given message.

Parameters:msg – the message
Example:
>>> raise_warning("Hello")
Warning: Hello