MCPcopy Create free account
hub / github.com/csev/py4e / substituteEncoding

Method substituteEncoding

old/old-code/BeautifulSoup.py:402–404  ·  view source on GitHub ↗
(self, str, encoding=None)

Source from the content-addressed store, hash-verified

400
401 # Utility methods
402 def substituteEncoding(self, str, encoding=None):
403 encoding = encoding or "utf-8"
404 return str.replace("%SOUP-ENCODING%", encoding)
405
406 def toEncoding(self, s, encoding=None):
407 """Encodes an object to a string in some encoding, or to Unicode.

Callers 2

__str__Method · 0.45
__str__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected