Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class InfiniteSupply:
def __init__(self, start):
self.current = start
def __iter__(self):
return self
def __next__(self):
value = self.current
self.current += 1
return value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment