Get the _abc_impl attribute from an ABC class
(cls: &PyObject, vm: &VirtualMachine)
| 74 | |
| 75 | /// Get the _abc_impl attribute from an ABC class |
| 76 | fn get_impl(cls: &PyObject, vm: &VirtualMachine) -> PyResult<PyRef<AbcData>> { |
| 77 | let impl_obj = cls.get_attr("_abc_impl", vm)?; |
| 78 | impl_obj |
| 79 | .downcast::<AbcData>() |
| 80 | .map_err(|_| vm.new_type_error("_abc_impl is set to a wrong type")) |
| 81 | } |
| 82 | |
| 83 | /// Check if obj is in the weak set |
| 84 | fn in_weak_set( |
no test coverage detected