MCPcopy Index your code
hub / github.com/python/cpython / _guess_media_encoding

Method _guess_media_encoding

Lib/xml/dom/xmlbuilder.py:248–255  ·  view source on GitHub ↗
(self, source)

Source from the content-addressed store, hash-verified

246 return urllib.request.build_opener()
247
248 def _guess_media_encoding(self, source):
249 info = source.byteStream.info()
250 # import email.message
251 # assert isinstance(info, email.message.Message)
252 charset = info.get_param('charset')
253 if charset is not None:
254 return charset.lower()
255 return None
256
257
258class DOMInputSource(object):

Callers 1

resolveEntityMethod · 0.95

Calls 3

get_paramMethod · 0.80
infoMethod · 0.45
lowerMethod · 0.45

Tested by

no test coverage detected