================
@@ -431,10 +431,10 @@ class value(object):
return int(self) % int(other)
def __divmod__(self, other):
- return int(self) % int(other)
+ return divmod(int(self), int(other))
----------------
Nerixyz wrote:
`__divmod__` is called to implement the
[`divmod`](https://docs.python.org/3/library/functions.html#divmod) operation.
So it should have the same return type as `divmod`:
> Take two (non-complex) numbers as arguments and return a pair of numbers
> consisting of their quotient and remainder when using integer division.
` a % b` only returns the remainder, not a tuple.
https://github.com/llvm/llvm-project/pull/214297
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits