summaryrefslogtreecommitdiff
path: root/py/builtinhelp.c
diff options
context:
space:
mode:
authorDavePutz <dwputz@gmail.com>2021-02-08 10:39:26 -0600
committerGitHub <noreply@github.com>2021-02-08 10:39:26 -0600
commitcec921f3747beccff10c2d2dfbc237c305083f62 (patch)
tree4fb9ed7d2dc50123b1d858a86f3556b4784405fa /py/builtinhelp.c
parent6043fdf94085bf2ec00e9f95149a74fb7eb0c7c4 (diff)
parent482e58307756bfec3cb7d4c0c8d73ffae0ec228d (diff)
Merge pull request #40 from adafruit/main
Update from adafruit main
Diffstat (limited to 'py/builtinhelp.c')
-rw-r--r--py/builtinhelp.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/py/builtinhelp.c b/py/builtinhelp.c
index d12e088d6..e1dcb6096 100644
--- a/py/builtinhelp.c
+++ b/py/builtinhelp.c
@@ -152,9 +152,18 @@ STATIC void mp_help_print_obj(const mp_obj_t obj) {
mp_obj_type_t *type = mp_obj_get_type(obj);
// try to print something sensible about the given object
- mp_print_str(MP_PYTHON_PRINTER, "object ");
+ const compressed_string_t* compressed = translate("object ");
+ char decompressed_object[decompress_length(compressed)];
+ decompress(compressed, decompressed_object);
+
+ mp_print_str(MP_PYTHON_PRINTER, decompressed_object);
mp_obj_print(obj, PRINT_STR);
- mp_printf(MP_PYTHON_PRINTER, " is of type %q\n", type->name);
+
+ compressed = translate(" is of type %q\n");
+ char decompressed_typestring[decompress_length(compressed)];
+ decompress(compressed, decompressed_typestring);
+
+ mp_printf(MP_PYTHON_PRINTER, decompressed_typestring, type->name);
mp_map_t *map = NULL;
if (type == &mp_type_module) {