diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-18 07:27:06 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-18 07:27:06 -0500 |
commit | fcee9c4992e44f926d472e818efe77021b903f8f (patch) | |
tree | 03f4ba68c36fa3e293c1187232ee17944e1d5554 /beautifulsoup/element.py | |
parent | d35b41180014d950c7ca17fc30bfc59a0df50103 (diff) |
Renamed findAllPrevious to find_all_previous.
Diffstat (limited to 'beautifulsoup/element.py')
-rw-r--r-- | beautifulsoup/element.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/beautifulsoup/element.py b/beautifulsoup/element.py index 082c71b..00b72b6 100644 --- a/beautifulsoup/element.py +++ b/beautifulsoup/element.py @@ -192,15 +192,16 @@ class PageElement: def findPrevious(self, name=None, attrs={}, text=None, **kwargs): """Returns the first item that matches the given criteria and appears before this Tag in the document.""" - return self._findOne(self.find_allPrevious, name, attrs, text, **kwargs) + return self._findOne(self.find_all_previous, name, attrs, text, **kwargs) - def find_allPrevious(self, name=None, attrs={}, text=None, limit=None, + def find_all_previous(self, name=None, attrs={}, text=None, limit=None, **kwargs): """Returns all items that match the given criteria and appear before this Tag in the document.""" return self._find_all(name, attrs, text, limit, self.previous_elements, **kwargs) - fetchPrevious = find_allPrevious # Compatibility with pre-3.x + findAllPrevious = find_all_previous # Compatibility with BS3 + fetchPrevious = find_all_previous # Compatibility with BS2 def findPreviousSibling(self, name=None, attrs={}, text=None, **kwargs): """Returns the closest sibling to this Tag that matches the |