Skip to content
Snippets Groups Projects
Select Git revision
  • dualcore
  • ch3/leds
  • wip-bootstrap default
  • ch3/time
  • master
5 results

modmicropython.c

  • Damien George's avatar
    791b65f4
    py/modmicropython: Add micropython.const, alias for identity function. · 791b65f4
    Damien George authored
    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.
    791b65f4
    History
    py/modmicropython: Add micropython.const, alias for identity function.
    Damien George authored
    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.