Browse Source

Fix bug when an extended slice's stop argument is missing.

tags/v0.2
Ben Kurtovic 11 years ago
parent
commit
65c3950e89
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mwparserfromhell/smart_list.py

+ 1
- 1
mwparserfromhell/smart_list.py View File

@@ -76,7 +76,7 @@ class SmartList(list):
def __getitem__(self, key): def __getitem__(self, key):
if not isinstance(key, slice): if not isinstance(key, slice):
return super(SmartList, self).__getitem__(key) return super(SmartList, self).__getitem__(key)
sliceinfo = [key.start or 0, key.stop or 0, key.step or 1]
sliceinfo = [key.start or 0, key.stop or maxsize, key.step or 1]
child = _ListProxy(self, sliceinfo) child = _ListProxy(self, sliceinfo)
self._children[id(child)] = (child, sliceinfo) self._children[id(child)] = (child, sliceinfo)
return child return child


Loading…
Cancel
Save