jack wrote: > > 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], also note: >>> import time >>> tm = time.gmtime() >>> tm (2001, 10, 30, 22, 54, 16, 1, 303, 0) >>> tm.tm_year 2001 >>> tm[:6] (2001, 10, 30, 22, 54, 16) >>> tm[3:6] (<nil>, <nil>, <nil>) in structseq_slice, for(i = low; i < high; ++i) { PyObject *v = obj->ob_item[i]; Py_INCREF(v); PyTuple_SET_ITEM(np, i, v); } should be: for(i = low; i < high; ++i) { PyObject *v = obj->ob_item[i]; Py_INCREF(v); PyTuple_SET_ITEM(np, i-low, v); } </F>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4