(zelf: &PyObject, vm: &VirtualMachine)
| 474 | } |
| 475 | |
| 476 | fn str_wrapper(zelf: &PyObject, vm: &VirtualMachine) -> PyResult<PyRef<PyStr>> { |
| 477 | let ret = vm.call_special_method(zelf, identifier!(vm, __str__), ())?; |
| 478 | ret.downcast::<PyStr>().map_err(|obj| { |
| 479 | vm.new_type_error(format!( |
| 480 | "__str__ returned non-string (type {})", |
| 481 | obj.class() |
| 482 | )) |
| 483 | }) |
| 484 | } |
| 485 | |
| 486 | fn hash_wrapper(zelf: &PyObject, vm: &VirtualMachine) -> PyResult<PyHash> { |
| 487 | let hash_obj = vm.call_special_method(zelf, identifier!(vm, __hash__), ())?; |
nothing calls this directly
no test coverage detected