span_text

function of dascore.utils.display source

span_text(
    low ,
    high ,
    units: str | None[str, None] = None,
)-> ‘Text | None’

How wide an extent is, as a repr states it.

Asked wherever a repr states two ends. How far apart they lie is a fact those two numbers do not carry: fiber running from 1212.4 m to 1636.7 m is 424.3 m of it, and the subtraction which says so is not work a reader should be left to do.

A time span is a duration, said in the largest unit which fits. Every other extent is as wide as its own numbers say, since reading one in seconds would state a different quantity than the one measured.

units is what to say that width in, and is stated wherever the caller knows them: a width is a quantity, and one said bare beside two ends which name their units reads as if it were in others.

None where there is no width to state: two ends which meet, which is one sample and not a span of nothing, and a dimension of labels, which has two ends and nothing measurable between them.