"long int..." exception reported with strange traceback location
Terry Reedy
tjreedy at udel.edu
Mon Jul 4 17:48:15 EDT 2005
"Michael Hoffman" <cam.ac.uk at mh391.invalid> wrote in message
news:dac6v4$5m1$1 at gemini.csx.cam.ac.uk...
> I came up with a simpler testcase. Strangely, the exception occurs in
> the statement *following* the os.utime() call:
>
> >>> import os, sys
> >>> os.utime("foo_test_file", (0, float(sys.maxint+1)))
> >>> print "hi"
> OverflowError: long int too large to convert to int
>
> Looks like a bug. You should report it on the SourceForge tracker.
Please include this simpler test, which make clear that bug not just in
deprecated (I believe) rfc module. Also note:
Python 2.2.1 (#34, Apr 9 2002, 19:34:33) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os, sys
>>> os.utime("foo_test_file", (0, float(sys.maxint+1)))
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: utime() arg 2 must be a tuple (atime, mtime)
which is quite sane. So maybe bug was introduced in 2.3 which you were
running.
More information about the Python-list
mailing list