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

Method _translate_newlines

Lib/subprocess.py:1151–1153  ·  view source on GitHub ↗
(self, data, encoding, errors)

Source from the content-addressed store, hash-verified

1149 self.text_mode = bool(universal_newlines)
1150
1151 def _translate_newlines(self, data, encoding, errors):
1152 data = data.decode(encoding, errors)
1153 return data.replace("\r\n", "\n").replace("\r", "\n")
1154
1155 def __enter__(self):
1156 return self

Callers 1

_communicateMethod · 0.95

Calls 2

decodeMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected