scistag.common.iter_helper.limit_iter

limit_iter(iterator, count=-1)[source]

Limit number of iterated elements from an iterable.

Parameters
  • iterator – The iterable

  • count (int) – The maximum count. -1 = unlimited