Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
035a0a2b
Commit
035a0a2b
authored
Oct 12, 2015
by
Damien George
Browse files
py: Add support for _ in REPL to hold last computed value.
Only available when MICROPY_CAN_OVERRIDE_BUILTINS is enabled.
parent
e813541e
Changes
2
Show whitespace changes
Inline
Side-by-side
py/modbuiltins.c
View file @
035a0a2b
...
...
@@ -416,6 +416,10 @@ STATIC mp_obj_t mp_builtin___repl_print__(mp_obj_t o) {
mp_obj_print_helper
(
&
mp_plat_print
,
o
,
PRINT_REPR
);
mp_print_str
(
&
mp_plat_print
,
"
\n
"
);
#endif
#if MICROPY_CAN_OVERRIDE_BUILTINS
mp_obj_t
dest
[
2
]
=
{
MP_OBJ_SENTINEL
,
o
};
mp_type_module
.
attr
((
mp_obj_t
)
&
mp_module_builtins
,
MP_QSTR__
,
dest
);
#endif
}
return
mp_const_none
;
}
...
...
py/qstrdefs.h
View file @
035a0a2b
...
...
@@ -35,6 +35,7 @@ QCFG(BYTES_IN_HASH, MICROPY_QSTR_BYTES_IN_HASH)
Q
()
Q
(
*
)
Q
(
_
)
Q
(
__build_class__
)
Q
(
__class__
)
Q
(
__doc__
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment