mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
better solution for bug #533234 courtesy of Tim.
Michael: use this version as the bugfix candidate...
This commit is contained in:
parent
e8c6a3eef6
commit
07c57d4e60
1 changed files with 2 additions and 1 deletions
|
@ -33,7 +33,8 @@ class _localized_name:
|
|||
if item < 0: item += self.len
|
||||
if not 0 <= item < self.len:
|
||||
raise IndexError, "out of range"
|
||||
return strftime(self.format, (item,)*8+(0,)).capitalize()
|
||||
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)
|
||||
def __len__(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue