File: basic_rr.py

package info (click to toggle)
python-roundrobin 0.0.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 116 kB
  • sloc: python: 140; makefile: 5
file content (10 lines) | stat: -rw-r--r-- 152 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
from itertools import cycle


def basic(dataset):
    iterator = cycle(dataset)

    def get_next():
        return next(iterator)

    return get_next