(cls: PyTypeRef, string: PyUtf8StrRef, vm: &VirtualMachine)
| 389 | |
| 390 | #[pyclassmethod] |
| 391 | fn fromhex(cls: PyTypeRef, string: PyUtf8StrRef, vm: &VirtualMachine) -> PyResult { |
| 392 | let result = crate::literal::float::from_hex(string.as_str().trim()) |
| 393 | .ok_or_else(|| vm.new_value_error("invalid hexadecimal floating-point string"))?; |
| 394 | PyType::call(&cls, vec![vm.ctx.new_float(result).into()].into(), vm) |
| 395 | } |
| 396 | |
| 397 | #[pymethod] |
| 398 | fn hex(&self) -> String { |
nothing calls this directly
no test coverage detected