mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Fix Issue #1769: Now int('- 1') or int('+ 1') is not allowed
any more. Thanks Juan Jose Conti. Also added tests.
This commit is contained in:
parent
587c2bfede
commit
2336bddd5d
3 changed files with 37 additions and 5 deletions
|
@ -1685,8 +1685,6 @@ PyLong_FromString(char *str, char **pend, int base)
|
|||
++str;
|
||||
sign = -1;
|
||||
}
|
||||
while (*str != '\0' && isspace(Py_CHARMASK(*str)))
|
||||
str++;
|
||||
if (base == 0) {
|
||||
if (str[0] != '0')
|
||||
base = 10;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue