Commit d13169fc authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-16055: Fixes incorrect error text for int('1', base=1000) (#6980)

Fixes incorrect error text for int('1', base=1000)
and long('1', base=1000).
parent 6a8954a9
......@@ -358,7 +358,7 @@ PyInt_FromString(char *s, char **pend, int base)
if ((base != 0 && base < 2) || base > 36) {
PyErr_SetString(PyExc_ValueError,
"int() base must be >= 2 and <= 36");
"int() base must be >= 2 and <= 36, or 0");
return NULL;
}
......
......@@ -1722,7 +1722,7 @@ PyLong_FromString(char *str, char **pend, int base)
if ((base != 0 && base < 2) || base > 36) {
PyErr_SetString(PyExc_ValueError,
"long() arg 2 must be >= 2 and <= 36");
"long() base must be >= 2 and <= 36, or 0");
return NULL;
}
while (*str != '\0' && isspace(Py_CHARMASK(*str)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment