[Pythonmac-SIG] slicing of structseq objects fails

Jack Jansen jack@oratrix.nl
Tue, 30 Oct 2001 23:25:44 +0100


Python-devvers,
Russel Owen reported the following bug, and it turns out to be a
general bug, not a MacPython one: slicing the structseq-style tuples
returned by time.gmtime() returns a sequence with NULLs in it. Shortly
afterwards Python crashes on my SGI.

Any takers?

Recently, Russell E Owen <owen@astro.washington.edu> said:
> 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],
> ...
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.cwi.nl/~jack        | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm