Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.
# test standard Python subscr using viper types
@micropython.viper
def get(dest, i: int):
i += 1
return dest[i]
def set(dest, i: int, val: int):
dest[i] = val + 1
ar = [i for i in range(3)]
for i in range(len(ar)):
set(ar, i - 1, i)
print(ar)
print(get(ar, i - 1))