diff --git a/vm/src/obj/objint.rs b/vm/src/obj/objint.rs index 3687ed2b0..fdb0459af 100644 --- a/vm/src/obj/objint.rs +++ b/vm/src/obj/objint.rs @@ -296,11 +296,7 @@ impl PyInt { #[pymethod(name = "__rxor__")] fn rxor(&self, other: PyObjectRef, vm: &VirtualMachine) -> PyObjectRef { - if objtype::isinstance(&other, &vm.ctx.int_type()) { - vm.ctx.new_int(get_value(&other) ^ (&self.value)) - } else { - vm.ctx.not_implemented() - } + self.xor(other, vm) } #[pymethod(name = "__or__")]