This commit is contained in:
Kovid Goyal 2015-02-21 10:57:23 +05:30
parent bd3b162d7a
commit fd002b6680

View File

@ -172,9 +172,9 @@ class Select(object):
yield item yield item
seen.add(item) seen.add(item)
def has_matches(self, selector): def has_matches(self, selector, root=None):
'Return True iff selector matches at least one item in the tree' 'Return True iff selector matches at least one item in the tree'
for elem in self(selector): for elem in self(selector, root=root):
return True return True
return False return False
# }}} # }}}