srange#

pybrops.core.util.subroutines.srange(start, stop, step)[source]#

Stop range generator. Similar to a normal range generator object, but also yields the stop index as its final output.

Parameters:
  • start (int) – Starting index.

  • stop (int) – Stopping index.

  • step (int) – Step to advance.

Yields:

out (Generator) – A Generator for indices.

Return type:

Generator