Message23175
Passing a floating point value greater than (2**31) - 1
yields the exception:
OverflowError: long int too long to convert to int
# e.g.,
fh = open("/dev/zero", "rb")
fh.seek((2.0 ** 31) - 1) # <--- works fine.
fh = open("/dev/zero", "rb")
fh.seek(2.0 ** 31) # <--- throws the above exception.
# Contrast with the behaviour with integers:
fh.seek(2 ** 31) # works fine
fh.seek((2 ** 63) - 1) # works fine
fh.seek(2 ** 63) # throws the exception |
|
| Date |
User |
Action |
Args |
| 2007-08-23 14:27:35 | admin | link | issue1067756 messages |
| 2007-08-23 14:27:35 | admin | create | |
|