implemented __getslice__ for the XPathSelectorList, still broken when using step-slices

--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%4094
This commit is contained in:
samus_ 2008-07-22 18:38:02 +00:00
parent a27b085c04
commit a7301cc9a2
1 changed files with 3 additions and 0 deletions

View File

@ -86,6 +86,9 @@ class XPathSelector(object):
class XPathSelectorList(list):
"""List of XPathSelector objects"""
def __getslice__(self, i, j):
return XPathSelectorList(list.__getslice__(self, i, j))
def x(self, xpath):
"""Perform the given XPath query on each XPathSelector of the list and
return a new (flattened) XPathSelectorList of the results"""