(self, indent_level=None,
                       eventual_encoding=DEFAULT_OUTPUT_ENCODING,
                       formatter="minimal")
return ''.join(s)
Renders the contents of this tag as a Unicode string.

        :param eventual_encoding: The tag is destined to be
           encoded into this encoding. This method is _not_
           responsible for performing that encoding. This information
           is passed in so that it can be substituted in if the
           document contains a <META> tag that mentions the document's
           encoding.
Renders the contents of this tag as a Unicode string.
Renders the contents of this tag as a Unicode string .
def decode_contents(self, indent_level=None,
                       eventual_encoding=DEFAULT_OUTPUT_ENCODING,
                       formatter="minimal"):
        """Renders the contents of this tag as a Unicode string.

        :param eventual_encoding: The tag is destined to be
           encoded into this encoding. This method is _not_
           responsible for performing that encoding. This information
           is passed in so that it can be substituted in if the
           document contains a <META> tag that mentions the document's
           encoding.
        """
        # First off, turn a string formatter into a function. This
        # will stop the lookup from happening over and over again.
        if not callable(formatter):
            formatter = self._formatter_for_name(formatter)

        pretty_print = (indent_level is not None)
        s = []
        for c in self:
            text = None
            if isinstance(c, NavigableString):
                text = c.output_ready(formatter)
            elif isinstance(c, Tag):
                s.append(c.decode(indent_level, eventual_encoding,
                                  formatter))
            if text and indent_level and not self.name == 'pre':
                text = text.strip()
            if text:
                if pretty_print and not self.name == 'pre':
                    s.append(" " * (indent_level - 1))
                s.append(text)
                if pretty_print and not self.name == 'pre':
                    s.append("\n")
        return ''.join(s)
def decode_contents ( self , indent_level = None , eventual_encoding = DEFAULT_OUTPUT_ENCODING , formatter = "minimal" ) : # First off, turn a string formatter into a function. This # will stop the lookup from happening over and over again. if not callable ( formatter ) : formatter = self . _formatter_for_name ( formatter ) pretty_print = ( indent_level is not None ) s = [ ] for c in self : text = None if isinstance ( c , NavigableString ) : text = c . output_ready ( formatter ) elif isinstance ( c , Tag ) : s . append ( c . decode ( indent_level , eventual_encoding , formatter ) ) if text and indent_level and not self . name == 'pre' : text = text . strip ( ) if text : if pretty_print and not self . name == 'pre' : s . append ( " " * ( indent_level - 1 ) ) s . append ( text ) if pretty_print and not self . name == 'pre' : s . append ( "\n" ) return '' . join ( s )