Commit e06cf89f authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

py: Add few more special methods.

parent 3611c1de
......@@ -368,10 +368,12 @@ const qstr mp_binary_op_method_name[] = {
*/
[MP_BINARY_OP_ADD] = MP_QSTR___add__,
[MP_BINARY_OP_SUBTRACT] = MP_QSTR___sub__,
#if MICROPY_PY_ALL_SPECIAL_METHODS
[MP_BINARY_OP_MULTIPLY] = MP_QSTR___mul__,
[MP_BINARY_OP_FLOOR_DIVIDE] = MP_QSTR___floordiv__,
[MP_BINARY_OP_TRUE_DIVIDE] = MP_QSTR___truediv__,
#endif
/*
MP_BINARY_OP_MULTIPLY,
MP_BINARY_OP_FLOOR_DIVIDE,
MP_BINARY_OP_TRUE_DIVIDE,
MP_BINARY_OP_MODULO,
MP_BINARY_OP_POWER,
MP_BINARY_OP_INPLACE_OR,
......@@ -381,9 +383,9 @@ const qstr mp_binary_op_method_name[] = {
MP_BINARY_OP_INPLACE_RSHIFT,*/
#if MICROPY_PY_ALL_SPECIAL_METHODS
[MP_BINARY_OP_INPLACE_ADD] = MP_QSTR___iadd__,
[MP_BINARY_OP_INPLACE_SUBTRACT] = MP_QSTR___isub__,
#endif
/*MP_BINARY_OP_INPLACE_SUBTRACT,
MP_BINARY_OP_INPLACE_MULTIPLY,
/*MP_BINARY_OP_INPLACE_MULTIPLY,
MP_BINARY_OP_INPLACE_FLOOR_DIVIDE,
MP_BINARY_OP_INPLACE_TRUE_DIVIDE,
MP_BINARY_OP_INPLACE_MODULO,
......
......@@ -76,7 +76,11 @@ Q(__le__)
Q(__ge__)
Q(__reversed__)
#if MICROPY_PY_ALL_SPECIAL_METHODS
Q(__mul__)
Q(__truediv__)
Q(__floordiv__)
Q(__iadd__)
Q(__isub__)
#endif
Q(micropython)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment