verry.interval.Converter#

class verry.interval.Converter#

Bases: ABC, Generic

Provides numeric/numeric and numeric/string conversions.

abstractmethod fromfloat(x, /)#

Convert a float to the number.

fromint(rnd, x, /)#

Convert an integer to the number with rounding taken into account.

This method is defined as fromstr(rnd, str(x)) if not overloaded.

abstractmethod fromstr(rnd, x, /)#

Convert a string to the number with rounding taken into account.

Raises:

ValueError – If value does not represent a number.

str(rnd, x, /)#

Convert the number to the string with rounding taken into account.