Mercurial > cpython-lru_cache-weakref
diff Python/compile.c @ 27849:3eb0376e93e8 2.2
Backport SF #660455 fix.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 12 Feb 2003 19:09:45 +0000 |
| parents | a94f272e600d |
| children | 9b4ff4bf033b |
line wrap: on
line diff
--- a/Python/compile.c Tue Feb 11 23:19:35 2003 +0000 +++ b/Python/compile.c Wed Feb 12 19:09:45 2003 +0000 @@ -1952,7 +1952,8 @@ && NCH(ppower) == 1 && TYPE((patom = CHILD(ppower, 0))) == atom && TYPE((pnum = CHILD(patom, 0))) == NUMBER - && !(childtype == MINUS && is_float_zero(STR(pnum)))) { + && !(childtype == MINUS && + (STR(pnum)[0] == '0' || is_float_zero(STR(pnum))))) { if (childtype == TILDE) { com_invert_constant(c, pnum); return;
