Exemplo n.º 1
0
/**
 * The builtin help() function.
 *
 * help([object])
 */
static mp_obj_t builtin_help(size_t n_args, const mp_obj_t *args_p)
{
    if (n_args == 0) {
        std_printf(help_text_p);
    } else {
        pyhelp_print_obj(args_p[0]);
    }

    return mp_const_none;
}
Exemplo n.º 2
0
STATIC mp_obj_t builtin_help(uint n_args, const mp_obj_t *args) {
    if (n_args == 0) {
        // print a general help message
        printf("%s", help_text);

    } else {
        // try to print something sensible about the given object
        pyhelp_print_obj(args[0]);
    }

    return mp_const_none;
}