quantum/test_generator.py
2019-09-24 22:41:16 +02:00

25 lines
409 B
Python

def gen():
print("start gen")
for i in range(30):
print('gen {}'.format(i))
yield i
def ingest(stream):
print("start ingest+")
for number in stream:
print("injest {}".format(number))
yield number
def main():
print("main")
stream = gen()
something = ingest(stream)
for i in something:
print(i)
if __name__ == "__main__":
main()