summaryrefslogtreecommitdiffstatshomepage
path: root/py/objtuple.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-08-09 21:20:42 +1000
committerDamien George <damien.p.george@gmail.com>2017-08-09 21:20:42 +1000
commiteb2784e8a2dc17b0f551b68d2b41eece3e5348a7 (patch)
tree1b77de30f8778dcf056065911c3eadb69a919522 /py/objtuple.c
parentcb7ecda9f0a1eac1d0b2a3148f5af592c5aa6211 (diff)
downloadmicropython-eb2784e8a2dc17b0f551b68d2b41eece3e5348a7.tar.gz
micropython-eb2784e8a2dc17b0f551b68d2b41eece3e5348a7.zip
py/objtuple: Allow to use inplace-multiplication operator on tuples.
Diffstat (limited to 'py/objtuple.c')
-rw-r--r--py/objtuple.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/py/objtuple.c b/py/objtuple.c
index 0b05755fb3..cbe6454943 100644
--- a/py/objtuple.c
+++ b/py/objtuple.c
@@ -148,7 +148,8 @@ mp_obj_t mp_obj_tuple_binary_op(mp_uint_t op, mp_obj_t lhs, mp_obj_t rhs) {
mp_seq_cat(s->items, o->items, o->len, p->items, p->len, mp_obj_t);
return MP_OBJ_FROM_PTR(s);
}
- case MP_BINARY_OP_MULTIPLY: {
+ case MP_BINARY_OP_MULTIPLY:
+ case MP_BINARY_OP_INPLACE_MULTIPLY: {
mp_int_t n;
if (!mp_obj_get_int_maybe(rhs, &n)) {
return MP_OBJ_NULL; // op not supported