Logo Search packages:      
Sourcecode: wapiti version File versions  Download package

def BeautifulSoup::PageElement::findParent (   self,
  name = None,
  attrs = {},
  kwargs 
) [inherited]

Returns the closest parent of this Tag that matches the given
criteria.

Definition at line 249 of file BeautifulSoup.py.

00249                                           {}, **kwargs):
        """Returns the closest parent of this Tag that matches the given
        criteria."""
        # NOTE: We can't use _findOne because findParents takes a different
        # set of arguments.
        r = None
        l = self.findParents(name, attrs, 1)
        if l:
            r = l[0]
        return r


Generated by  Doxygen 1.6.0   Back to index