micropython

Annotated docs/native.txt

635:74ad0468297b
2013-01-15 Paul Boddie Added support for multiple class definitions in the same namespace with the same name. Made classes attribute users.
paul@253 1
Native Function Definitions
paul@253 2
===========================
paul@253 3
paul@253 4
Native functions are principally associated with the facilities of the
paul@253 5
builtins module. Although a Python module is provided to define the contents
paul@253 6
of this module (referenced via the __builtins__ module name in programs),
paul@253 7
unlike other modules, it is not generally desirable to translate the code of
paul@253 8
the builtins module literally; instead, native functions are provided which
paul@253 9
define the functionality, and these functions are invoked internally in the
paul@253 10
RSVP machine.
paul@253 11
paul@253 12
However, some definitions found in the builtins module should be translated,
paul@253 13
since it is possible to define the behaviour of these objects efficiently in
paul@253 14
Python. Such definitions employ docstrings, indicating that the contents of
paul@253 15
the object definitions are to be traversed by the code generator.