summaryrefslogtreecommitdiff
path: root/py/builtinhelp.c
AgeCommit message (Collapse)Author
2018-05-02py/builtinhelp: Change occurrence of mp_uint_t to size_t.Damien George
2017-11-16py/objstr: Remove "make_qstr_if_not_already" arg from mp_obj_new_str.Damien George
This patch simplifies the str creation API to favour the common case of creating a str object that is not forced to be interned. To force interning of a new str the new mp_obj_new_str_via_qstr function is added, and should only be used if warranted. Apart from simplifying the mp_obj_new_str function (and making it have the same signature as mp_obj_new_bytes), this patch also reduces code size by a bit (-16 bytes for bare-arm and roughly -40 bytes on the bare-metal archs).
2017-09-12py/builtinhelp: Change signature of help text var from pointer to array.Damien George
As a pointer (const char *) it takes up an extra word of storage which is in RAM.
2017-09-10py/builtinhelp: Simplify code slightly by extracting object type.Damien George
Reduces code size by about 10 bytes.
2017-01-22py/builtinhelp: Implement help('modules') to list available modules.Damien George
This is how CPython does it, and it's very useful to help users discover the available modules for a given port, especially built-in and frozen modules. The function does not list modules that are in the filesystem because this would require a fair bit of work to do correctly, and is very port specific (depending on the filesystem).
2017-01-22py: Add builtin help function to core, with default help msg.Damien George
This builtin is configured using MICROPY_PY_BUILTINS_HELP, and is disabled by default.