[Pythonmac-SIG] Mysterious SystemError in MacPython 2.2b1

Russell E Owen owen@astro.washington.edu
Tue, 30 Oct 2001 10:02:14 -0800


The following code fails (G4, MacOS 9.2.1) in Classic MacPython 2.2b1:

import time

currUTCTuple= time.gmtime(time.time())
print "currUTCTuple=%r" % (currUTCTuple,)
print "currUTCTuple[3:6]=%r" % (currUTCTuple[3:6],)
fmtTime = "%s:%02i:%02i" % currUTCTuple[3:6]
print "formatted time = ", fmtTime

It displays (<NULL>, <NULL>, <NULL>) for currUTCTuple[3:6], which is wrong, and then the fmtTime =... statement raises a SystemError. Sometimes the PythonInterpreter or Python IDE to exit to the debugger showing an unmapped memory exception (and I have a StdLog from that if anybody wants it).

Anybody else seeing this?

-- Russell