circuitpython/tests/micropython/native_const.py

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

22 lines
225 B
Python
Raw Normal View History

# test loading constants in native functions
2021-04-20 01:22:44 -04:00
@micropython.native
def f():
2021-04-20 01:22:44 -04:00
return b"bytes"
print(f())
2021-04-20 01:22:44 -04:00
@micropython.native
def f():
@micropython.native
def g():
return 123
2021-04-20 01:22:44 -04:00
return g
2021-04-20 01:22:44 -04:00
print(f()())