default return value for extract_first

This commit is contained in:
bosnj 2015-04-10 15:32:32 +02:00
parent 543d02bc64
commit 6b4439eacc
1 changed files with 2 additions and 2 deletions

View File

@ -182,9 +182,9 @@ class SelectorList(list):
def extract(self):
return [x.extract() for x in self]
def extract_first(self):
def extract_first(self, default=None):
for x in self:
return x.extract()
return x.extract() or default
@deprecated(use_instead='.extract()')
def extract_unquoted(self):