mirror of
https://github.com/micropython/micropython.git
synced 2026-01-08 13:10:21 +01:00
Generator objects now allocate the object and the state in one malloc. This improvement fixes Issue #38.
4 lines
56 B
Python
4 lines
56 B
Python
gen = (i for i in range(10))
|
|
for i in gen:
|
|
print(i)
|