Commit Graph

4 Commits

Author SHA1 Message Date
MicroDev
d9d94eacca
run updated pre-commit 2023-02-01 13:38:41 +05:30
microDev
a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Damien George
791b65f4b2 py/modmicropython: Add micropython.const, alias for identity function.
Having a micropython.const identity function, and writing "from micropython
import const" at the start of scripts that use the const feature, allows to
write scripts which are compatible with CPython, and with uPy builds that
don't include const optimisation.

This patch adds such a function and updates the tests to do the import.
2016-09-27 13:34:21 +10:00
Damien George
38b54b65d4 tests/micropython: Add tests for const names being replaced in parser. 2016-09-27 13:03:53 +10:00