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:
Facundo Batista 2008-01-19 19:12:01 +00:00
parent 587c2bfede
commit 2336bddd5d
3 changed files with 37 additions and 5 deletions

View file

@ -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;