Python 1.5.2 and large files (Solaris 7)

Steve Clift clift at mail.anacapa.net
Wed May 26 22:34:16 EDT 1999


At 12:40 AM 1999-05-26 -0400, the night watchman wrote:

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

[snip]

>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

Checkmate. Now I feel strongly about it.

How do you come up with this sort of stuff at such an hour?

-Steve






More information about the Python-list mailing list