Skip to main content

Python class

Range

Range​

class max.pipelines.modeling.types.Range(start, end)

source

Bases: object

Represents a range with start and end indices.

Parameters:

  • start (int) – The inclusive start index.
  • end (int) – The exclusive end index.

advance()​

advance()

source

Advance the range to the next token.

Return type:

None

bump_end()​

bump_end(amount)

source

Bump the end index by the given amount.

Parameters:

amount (int) – The amount to bump the end index by.

Return type:

None

bump_start()​

bump_start(amount)

source

Bump the start index by the given amount.

Parameters:

amount (int) – The amount to bump the start index by.

Raises:

ValueError – If the new start index would exceed the end index.

Return type:

None

end​

end: int

source

start​

start: int

source