(&self, vm: &VirtualMachine)
| 666 | impl Py<PyBaseException> { |
| 667 | #[pymethod] |
| 668 | pub(super) fn __str__(&self, vm: &VirtualMachine) -> PyResult<PyStrRef> { |
| 669 | let str_args = vm.exception_args_as_string(self.args(), true); |
| 670 | Ok(match str_args.into_iter().exactly_one() { |
| 671 | Err(i) if i.len() == 0 => vm.ctx.empty_str.to_owned(), |
| 672 | Ok(s) => s, |
| 673 | Err(i) => PyStr::from(format!("({})", i.format(", "))).into_ref(&vm.ctx), |
| 674 | }) |
| 675 | } |
| 676 | } |
| 677 | |
| 678 | #[pyclass] |
nothing calls this directly
no test coverage detected