From 06d3036de29dde3414671a73ea5697fd82310578 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Tue, 11 Dec 2012 18:07:13 -0500 Subject: [PATCH] Fix a certain bug in SmartList with Py3k (closes #17) --- mwparserfromhell/smart_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mwparserfromhell/smart_list.py b/mwparserfromhell/smart_list.py index 9a77e19..5df6a0e 100644 --- a/mwparserfromhell/smart_list.py +++ b/mwparserfromhell/smart_list.py @@ -76,7 +76,7 @@ class SmartList(list): def __getitem__(self, key): if not isinstance(key, slice): return super(SmartList, self).__getitem__(key) - sliceinfo = [key.start, key.stop, 1 if not key.step else key.step] + sliceinfo = [key.start or 0, key.stop or 0, key.step or 1] child = _ListProxy(self, sliceinfo) self._children[id(child)] = (child, sliceinfo) return child