get_range

sofia_redux.scan.utilities.utils.get_range(value, default=<sofia_redux.scan.utilities.range.Range object> (-inf -> inf), is_positive=False)[source]

Return a Range object generated from the given value.

Parameters:
valuething

The thing to resolve.

defaultRange, optional

The default result to return if a Range could not be resolved.

is_positivebool, optional

If True, all values in the range are considered positive and any ‘-’ character in spec will be treated as a delimiter rather than a minus sign.

Returns:
Range