Damien George
4b57330465
py/objstr: Return unsupported binop instead of raising TypeError.
...
So that user types can implement reverse operators and have them work with
str on the left-hand-side, eg `"a" + UserType()`.
Signed-off-by: Damien George <damien@micropython.org >
2023-05-19 13:42:35 +10:00
Damien George
709136e844
tests/basics: Use str.format instead of % for formatting messages.
...
Only use % formatting when testing % itself, because only str.format is
guaranteed to be available on any port.
2019-10-29 22:22:37 +11:00
Paul Sokolovsky
d6f9d64d97
tests/class_reverse_op: Test for reverse arith ops special methods.
...
This test should be run only if support for reverse ops is enabled, so
the corresponding feature_check is added to run-tests.
2017-09-10 17:05:57 +03:00