[CPython `method_is_overloaded`](https://github.com/python/cpython/blob/v3.14.3/Objects/typeobject.c#L9849-L9879)
(
class_a: &Py<PyType>,
class_b: &Py<PyType>,
rop_name: Option<&'static PyStrInterned>,
vm: &VirtualMachine,
)
| 11 | |
| 12 | /// [CPython `method_is_overloaded`](https://github.com/python/cpython/blob/v3.14.3/Objects/typeobject.c#L9849-L9879) |
| 13 | fn method_is_overloaded( |
| 14 | class_a: &Py<PyType>, |
| 15 | class_b: &Py<PyType>, |
| 16 | rop_name: Option<&'static PyStrInterned>, |
| 17 | vm: &VirtualMachine, |
| 18 | ) -> PyResult<bool> { |
| 19 | let Some(rop_name) = rop_name else { |
| 20 | return Ok(false); |
| 21 | }; |
| 22 | let Some(method_b) = class_b.get_attr(rop_name) else { |
| 23 | return Ok(false); |
| 24 | }; |
| 25 | class_a.get_attr(rop_name).map_or(Ok(true), |method_a| { |
| 26 | vm.identical_or_equal(&method_a, &method_b).map(|eq| !eq) |
| 27 | }) |
| 28 | } |
| 29 | |
| 30 | macro_rules! binary_func { |
| 31 | ($fn:ident, $op_slot:ident, $op:expr) => { |
no test coverage detected