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

Method encode

code3/bs4/element.py:1050–1056  ·  view source on GitHub ↗
(self, encoding=DEFAULT_OUTPUT_ENCODING,
               indent_level=None, formatter="minimal",
               errors="xmlcharrefreplace")

Source from the content-addressed store, hash-verified

1048 __str__ = __repr__ = __unicode__
1049
1050 def encode(self, encoding=DEFAULT_OUTPUT_ENCODING,
1051 indent_level=None, formatter="minimal",
1052 errors="xmlcharrefreplace"):
1053 # Turn the data structure into Unicode, then encode the
1054 # Unicode.
1055 u = self.decode(indent_level, encoding, formatter)
1056 return u.encode(encoding, errors)
1057
1058 def _should_pretty_print(self, indent_level):
1059 """Should this tag be pretty-printed?"""

Callers 15

__repr__Method · 0.95
__str__Method · 0.95
prettifyMethod · 0.95
toEncodingMethod · 0.45
__str__Method · 0.45
_detectEncodingMethod · 0.45
_handle_errorMethod · 0.45
toEncodingMethod · 0.45
__str__Method · 0.45
_detectEncodingMethod · 0.45
_utf8_strFunction · 0.45
toEncodingMethod · 0.45

Calls 1

decodeMethod · 0.95