(obj: PyObjectRef, spec: PyUtf8StrRef, vm: &VirtualMachine)
| 102 | impl PyBool { |
| 103 | #[pymethod] |
| 104 | fn __format__(obj: PyObjectRef, spec: PyUtf8StrRef, vm: &VirtualMachine) -> PyResult<String> { |
| 105 | let new_bool = obj.try_to_bool(vm)?; |
| 106 | FormatSpec::parse(spec.as_str()) |
| 107 | .and_then(|format_spec| format_spec.format_bool(new_bool)) |
| 108 | .map_err(|err| err.into_pyexception(vm)) |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | impl PyBool { |
nothing calls this directly
no test coverage detected