Author churchr
Recipients
Date 2004-11-17.01:10:40
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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
History
Date User Action Args
2007-08-23 14:27:35adminlinkissue1067756 messages
2007-08-23 14:27:35admincreate