Return a signed value for abs(int).
This means abs(MIN_INT) has the "overflow" behavior of returning MIN_INT as in C, but avoids surprising unsigned arithmetic for all other values. To preserve Python compatibility, abs(x) dissallows integer inference for x just like the other potentially overflowing arithmetic operators. This fixes Github Issue #1837
Showing
Please register or sign in to comment