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

Function _safe_print

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

Source from the content-addressed store, hash-verified

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

Callers 1

listMethod · 0.85

Calls 2

decodeMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…