We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 59d4e4e + 6e7e6ec commit c0a6f61Copy full SHA for c0a6f61
vm/src/obj/objfloat.rs
@@ -323,7 +323,7 @@ impl PyFloat {
323
} else if objtype::isinstance(&arg, &vm.ctx.int_type()) {
324
objint::get_float_value(&arg, vm)?
325
} else if objtype::isinstance(&arg, &vm.ctx.str_type()) {
326
- match lexical::try_parse(objstr::get_value(&arg)) {
+ match lexical::try_parse(objstr::get_value(&arg).trim()) {
327
Ok(f) => f,
328
Err(_) => {
329
let arg_repr = vm.to_pystr(&arg)?;
0 commit comments