micropython/tests/basics/bytes_gen.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

6 lines
114 B
Python
Raw Normal View History

# construct a bytes object from a generator
def gen():
for i in range(4):
yield i
print(bytes(gen()))