Terry J. Reedy added the comment: I am pretty sure the 2.x anomaly is tied up with having short ints plus the anomaly of having one more negative than positive int.
>>> 2147483648 2147483648L >>> -(2147483648) -2147483648L >>> -2147483648 -2147483648 I believe the last result was once the same as the middle result because I remember reading or even writing the explanation that -2147483648 is (was) parsed as -(2147483648) (or something like this). Raymond' also made more liberal in other ways: literal_eval('(+1)+(-1)') in now 0 instead of ValueError: malformed string. The 3.x doc was not changed to match, though. ---------- nosy: +terry.reedy resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25335> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com