MCPcopy Index your code
hub / github.com/RustPython/RustPython / _safe_print

Function _safe_print

Lib/tarfile.py:261–265  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

259 return
260
261def _safe_print(s):
262 encoding = getattr(sys.stdout, 'encoding', None)
263 if encoding is not None:
264 s = s.encode(encoding, 'backslashreplace').decode(encoding)
265 print(s, end=' ')
266
267
268class TarError(Exception):

Callers 1

listMethod · 0.85

Calls 4

getattrFunction · 0.85
printFunction · 0.50
decodeMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected