[Python-checkins] CVS: python/dist/src/Lib calendar.py,1.25,1.26
Skip Montanaro
montanaro@users.sourceforge.net
Fri, 22 Mar 2002 10:35:53 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv7051
Modified Files:
calendar.py
Log Message:
better solution for bug #533234 courtesy of Tim.
Michael: use this version as the bugfix candidate...
Index: calendar.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/calendar.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** calendar.py 22 Mar 2002 18:07:49 -0000 1.25
--- calendar.py 22 Mar 2002 18:35:51 -0000 1.26
***************
*** 34,38 ****
if not 0 <= item < self.len:
raise IndexError, "out of range"
! return strftime(self.format, (item,)*8+(0,)).capitalize()
elif isinstance(item, type(slice(0))):
return [self[e] for e in range(self.len)].__getslice__(item.start, item.stop)
--- 34,39 ----
if not 0 <= item < self.len:
raise IndexError, "out of range"
! t = (2001, 1, item+1, 12, 0, 0, item, item+1, 0)
! return strftime(self.format, t).capitalize()
elif isinstance(item, type(slice(0))):
return [self[e] for e in range(self.len)].__getslice__(item.start, item.stop)