Explorar el Código

Fix a certain bug in SmartList with Py3k (closes #17)

tags/v0.2
Ben Kurtovic hace 11 años
padre
commit
06d3036de2
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      mwparserfromhell/smart_list.py

+ 1
- 1
mwparserfromhell/smart_list.py Ver fichero

@@ -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


Cargando…
Cancelar
Guardar