3 ms·
"Overflowing an int" is something that I worry about when I'm thinking in terms of memory layout of data. I shouldn't have to worry about it when working at a h
by hythloday 14y ago
"Overflowing an int" is something that I worry about when I'm thinking in terms of memory layout of data. I shouldn't have to worry about it when working at a higher level of abstraction. Python handles this correctly:
>>> int('0x7fffffff', 16)
2147483647
>>> int('0x7fffffff', 16) + 1
2147483648L