~leonardr/beautifulsoup/aaron-patch

« back to all changes in this revision

Viewing changes to BeautifulSoup.py

  • Committer: Leonard Richardson
  • Date: 2009-11-27 02:13:15 UTC
  • Revision ID: leonard.richardson@canonical.com-20091127021315-x85ll2a5fwez43gw
Fixed getText(), added NEWS file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
557
557
        self.append(string)
558
558
 
559
559
    string = property(getString, setString)
560
 
    
 
560
 
561
561
    def getText(self, separator=u""):
562
562
        if not len(self.contents):
563
563
            return u""
568
568
            if isinstance(current, NavigableString):
569
569
                strings.append(current.strip())
570
570
            current = current.next
571
 
        return u"".join(strings)
572
 
            
573
 
    
 
571
        return separator.join(strings)
 
572
 
574
573
    text = property(getText)
575
574
 
576
575
    def get(self, key, default=None):