(zelf: &PyObject, vm: &VirtualMachine)
| 464 | } |
| 465 | |
| 466 | fn repr_wrapper(zelf: &PyObject, vm: &VirtualMachine) -> PyResult<PyRef<PyStr>> { |
| 467 | let ret = vm.call_special_method(zelf, identifier!(vm, __repr__), ())?; |
| 468 | ret.downcast::<PyStr>().map_err(|obj| { |
| 469 | vm.new_type_error(format!( |
| 470 | "__repr__ returned non-string (type {})", |
| 471 | obj.class() |
| 472 | )) |
| 473 | }) |
| 474 | } |
| 475 | |
| 476 | fn str_wrapper(zelf: &PyObject, vm: &VirtualMachine) -> PyResult<PyRef<PyStr>> { |
| 477 | let ret = vm.call_special_method(zelf, identifier!(vm, __str__), ())?; |
nothing calls this directly
no test coverage detected