Content-Length: 287308 | pFad | http://github.com/python/cpython/commit/4fa7504ee3184cff064e23fe6799e717ed0f9357

47 bpo-27268: Fix incorrect error message on float('') (GH-2745) · python/cpython@4fa7504 · GitHub
Skip to content

Commit 4fa7504

Browse files
pslacerdacsabella
authored andcommitted
bpo-27268: Fix incorrect error message on float('') (GH-2745)
1 parent 871ff77 commit 4fa7504

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Python/pystrtod.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,15 +353,15 @@ PyOS_string_to_double(const char *s,
353353
else if (!endptr && (fail_pos == s || *fail_pos != '\0'))
354354
PyErr_Format(PyExc_ValueError,
355355
"could not convert string to float: "
356-
"%.200s", s);
356+
"'%.200s'", s);
357357
else if (fail_pos == s)
358358
PyErr_Format(PyExc_ValueError,
359359
"could not convert string to float: "
360-
"%.200s", s);
360+
"'%.200s'", s);
361361
else if (errno == ERANGE && fabs(x) >= 1.0 && overflow_exception)
362362
PyErr_Format(overflow_exception,
363363
"value too large to convert to float: "
364-
"%.200s", s);
364+
"'%.200s'", s);
365365
else
366366
result = x;
367367

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/python/cpython/commit/4fa7504ee3184cff064e23fe6799e717ed0f9357

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy