10000 follow CPython error message · RustPython/RustPython@ded6392 · GitHub
[go: up one dir, main page]

Skip to content
< 8000 header class="Box-sc-g0xbh4-0 prc-PageLayout-Header-mQXK1" style="--spacing:var(--spacing-none)">

Commit ded6392

Browse files
committed
follow CPython error message
1 parent 3e8e22b commit ded6392

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vm/src/builtins/float.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ fn inner_divmod(v1: f64, v2: f64, vm: &VirtualMachine) -> PyResult<(f64, f64)> {
124124

125125
pub fn float_pow(v1: f64, v2: f64, vm: &VirtualMachine) -> PyResult {
126126
if v1.is_zero() && v2.is_sign_negative() {
127-
let msg = format!("{v1:?} cannot be raised to a negative power");
127+
let msg = format!("0.0 cannot be raised to a negative power");
128128
Err(vm.new_zero_division_error(msg))
129129
} else if v1.is_sign_negative() && (v2.floor() - v2).abs() > f64::EPSILON {
130130
let v1 = Complex64::new(v1, 0.);

0 commit comments

Comments
 (0)
0