ValueRange

class ValueRange(lower=None, lower_inclusive=False, upper=None, upper_inclusive=False)[source]

Bases: object

A value range description.

Attributes Summary

lower

the lower bound

lower_inclusive

whether the lower bound is inclusive

upper

the upper bound

upper_inclusive

whether the upper bound is inclusive

Methods Summary

approximate(epsilon)

Create a slightly enlarged value range for approximate checks.

notate()

Get the math notation for the range of this metric.

Attributes Documentation

Parameters
lower: Optional[float] = None

the lower bound

lower_inclusive: bool = False

whether the lower bound is inclusive

upper: Optional[float] = None

the upper bound

upper_inclusive: bool = False

whether the upper bound is inclusive

Methods Documentation

approximate(epsilon)[source]

Create a slightly enlarged value range for approximate checks.

Return type

ValueRange

Parameters

epsilon (float) –

notate()[source]

Get the math notation for the range of this metric.

Return type

str