Skip to content

Instantly share code, notes, and snippets.

View OOPMan's full-sized avatar

Adam Jorgensen OOPMan

  • Cape Town, Western Cape, South Africa
View GitHub Profile
@OOPMan
OOPMan / Sequence.py
Created October 9, 2017 10:17
Class wrapping itertools.count to provide some additional functionality
import itertools
class Sequence(object):
"""
This class wraps itertools.count to provide additional bound means of
extracting data from the stream
"""
def __init__(self, start: int=0, step: int=1):
self._counter = itertools.count(start=start, step=step)