diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2011-05-21 12:01:25 -0400 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2011-05-21 12:01:25 -0400 |
commit | f2f5df1563c3861a1f28bcfc0532d2e54de50cab (patch) | |
tree | 80ef5e707ee88295ce2297cb86678ef6d8fe03a9 /bs4/element.py | |
parent | 7103a5f5ebcf655f9f8288eb54663b2485e197a9 (diff) |
More Python 3 compatibility.
Diffstat (limited to 'bs4/element.py')
-rw-r--r-- | bs4/element.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bs4/element.py b/bs4/element.py index c7dbd6b..a10e615 100644 --- a/bs4/element.py +++ b/bs4/element.py @@ -501,7 +501,7 @@ class Tag(PageElement): """Calling a tag like a function is the same as calling its find_all() method. Eg. tag('a') returns a list of all the A tags found within this tag.""" - return apply(self.find_all, args, kwargs) + return self.find_all(args, kwargs) def __getattr__(self, tag): #print "Getattr %s.%s" % (self.__class__, tag) @@ -509,7 +509,8 @@ class Tag(PageElement): return self.find(tag[:-3]) elif tag.find('__') != 0: return self.find(tag) - raise AttributeError, "'%s' object has no attribute '%s'" % (self.__class__, tag) + raise AttributeError( + "'%s' object has no attribute '%s'" % (self.__class__, tag)) def __eq__(self, other): """Returns true iff this tag has the same name, the same attributes, |