You've already forked Core2forAWS-MicroPython
mirror of
https://github.com/m5stack/Core2forAWS-MicroPython.git
synced 2026-05-20 10:30:31 -07:00
7a97e4351b
And make it generic so it can be run on any target. Signed-off-by: Damien George <damien@micropython.org>
20 lines
190 B
Python
20 lines
190 B
Python
# test for native for loops
|
|
|
|
|
|
@micropython.native
|
|
def f1(n):
|
|
for i in range(n):
|
|
print(i)
|
|
|
|
|
|
f1(4)
|
|
|
|
|
|
@micropython.native
|
|
def f2(r):
|
|
for i in r:
|
|
print(i)
|
|
|
|
|
|
f2(range(4))
|