Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

lino.utils.cycler

Turns a list of items into an endless loop. Useful when generating demo fixtures.

See examples in Lino utilities.

Classes

Cycler(*args)

An iterator that loops over an iteration and starts back at the beginning when it reaches the end.

class lino.utils.cycler.Cycler(*args)

Bases: object

An iterator that loops over an iteration and starts back at the beginning when it reaches the end.

TODO: replace this by itertools.cycle().