Python 1.5.2 and large files (Solaris 7)

Tim Peters tim_one at email.msn.com
Wed May 26 00:40:24 EDT 1999


[about whether integer-yielding ops on huge files should always return long,
 or cut back to int when they're small enough]

[Steve Clift, by an amazing coincidence both implemented *and* prefers
 the former]
> ...
> However, I don't feel that strongly about it. Anyone else?

When I get back a position from f.tell() and add 1017 to it, knowing a
priori that the sum is also a valid position for the file, I don't ever want
to see an OverflowError.  I hope Python2 obliterates the user-visibile
distinction between ints and longs, but in Python1 int arithmetic can
overflow, and file positions (whether computed or revealed) are expected to
overflow an int in the presence of huge files.

all-long-all-the-time-so-long-as-it-matters-ly y'rs  - tim






More information about the Python-list mailing list