Skip to content
Snippets Groups Projects
Commit 0a36a80f authored by Damien George's avatar Damien George
Browse files

py/objtype: Clarify comment about configuring inplace op methods.

In 0e80f345 the inplace operations __iadd__
and __isub__ were made unconditionally available, so the comment about this
section is changed to reflect that.
parent a5b583ad
Branches
No related tags found
No related merge requests found
...@@ -460,8 +460,7 @@ const byte mp_binary_op_method_name[MP_BINARY_OP_NUM_RUNTIME] = { ...@@ -460,8 +460,7 @@ const byte mp_binary_op_method_name[MP_BINARY_OP_NUM_RUNTIME] = {
// MP_BINARY_OP_NOT_EQUAL, // a != b calls a == b and inverts result // MP_BINARY_OP_NOT_EQUAL, // a != b calls a == b and inverts result
[MP_BINARY_OP_CONTAINS] = MP_QSTR___contains__, [MP_BINARY_OP_CONTAINS] = MP_QSTR___contains__,
// All inplace methods are optional, and normal methods will be used // If an inplace method is not found a normal method will be used as a fallback
// as a fallback.
[MP_BINARY_OP_INPLACE_ADD] = MP_QSTR___iadd__, [MP_BINARY_OP_INPLACE_ADD] = MP_QSTR___iadd__,
[MP_BINARY_OP_INPLACE_SUBTRACT] = MP_QSTR___isub__, [MP_BINARY_OP_INPLACE_SUBTRACT] = MP_QSTR___isub__,
#if MICROPY_PY_ALL_INPLACE_SPECIAL_METHODS #if MICROPY_PY_ALL_INPLACE_SPECIAL_METHODS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment