micropython

docs/native.txt

746:59be62d8e75f
2013-11-25 Paul Boddie Fixed loadconstant usage to include both the constant and the new context. syspython-as-target
     1 Native Function Definitions
     2 ===========================
     3 
     4 Native functions are principally associated with the facilities of the
     5 builtins module. Although a Python module is provided to define the contents
     6 of this module (referenced via the __builtins__ module name in programs),
     7 unlike other modules, it is not generally desirable to translate the code of
     8 the builtins module literally; instead, native functions are provided which
     9 define the functionality, and these functions are invoked internally in the
    10 RSVP machine.
    11 
    12 However, some definitions found in the builtins module should be translated,
    13 since it is possible to define the behaviour of these objects efficiently in
    14 Python. Such definitions employ docstrings, indicating that the contents of
    15 the object definitions are to be traversed by the code generator.