MCPcopy Index your code
hub / github.com/csev/py4e / getText

Method getText

code/pagerank/BeautifulSoup.py:562–572  ·  view source on GitHub ↗
(self, separator=u"")

Source from the content-addressed store, hash-verified

560 string = property(getString, setString)
561
562 def getText(self, separator=u""):
563 if not len(self.contents):
564 return u""
565 stopNode = self._lastRecursiveChild().next
566 strings = []
567 current = self.contents[0]
568 while current is not stopNode:
569 if isinstance(current, NavigableString):
570 strings.append(current.strip())
571 current = current.next
572 return separator.join(strings)
573
574 text = property(getText)
575

Callers

nothing calls this directly

Calls 2

_lastRecursiveChildMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected