summaryrefslogtreecommitdiff
path: root/tests/micropython/native_for.py
blob: c640a8d08b576f4eebb0f3728624e4a934bcbfe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 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))