summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--py/builtin.c2
-rw-r--r--py/makeqstrdata.py1
-rw-r--r--py/qstrdefs.h2
3 files changed, 3 insertions, 2 deletions
diff --git a/py/builtin.c b/py/builtin.c
index b02608b407..5911fa6342 100644
--- a/py/builtin.c
+++ b/py/builtin.c
@@ -208,7 +208,7 @@ STATIC mp_obj_t mp_builtin_hash(mp_obj_t o_in) {
MP_DEFINE_CONST_FUN_OBJ_1(mp_builtin_hash_obj, mp_builtin_hash);
STATIC mp_obj_t mp_builtin_hex(mp_obj_t o_in) {
- return mp_binary_op(MP_BINARY_OP_MODULO, MP_OBJ_NEW_QSTR(MP_QSTR__percent_x), o_in);
+ return mp_binary_op(MP_BINARY_OP_MODULO, MP_OBJ_NEW_QSTR(MP_QSTR__percent__hash_x), o_in);
}
MP_DEFINE_CONST_FUN_OBJ_1(mp_builtin_hex_obj, mp_builtin_hex);
diff --git a/py/makeqstrdata.py b/py/makeqstrdata.py
index f8605ae093..8620af5673 100644
--- a/py/makeqstrdata.py
+++ b/py/makeqstrdata.py
@@ -17,6 +17,7 @@ codepoint2name[ord('.')] = 'dot'
codepoint2name[ord(':')] = 'colon'
codepoint2name[ord('/')] = 'slash'
codepoint2name[ord('%')] = 'percent'
+codepoint2name[ord('#')] = 'hash'
# this must match the equivalent function in qstr.c
def compute_hash(qstr):
diff --git a/py/qstrdefs.h b/py/qstrdefs.h
index e9f2d8d9a4..d18882f69e 100644
--- a/py/qstrdefs.h
+++ b/py/qstrdefs.h
@@ -107,7 +107,7 @@ Q(getattr)
Q(globals)
Q(hash)
Q(hex)
-Q(%x)
+Q(%#x)
Q(id)
Q(io)
Q(int)