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

Function write

Lib/quopri.py:57–65  ·  view source on GitHub ↗
(s, output=output, lineEnd=b'\n')

Source from the content-addressed store, hash-verified

55 return
56
57 def write(s, output=output, lineEnd=b'\n'):
58 # RFC 1521 requires that the line ending in a space or tab must have
59 # that trailing character encoded.
60 if s and s[-1:] in b' \t':
61 output.write(s[:-1] + quote(s[-1:]) + lineEnd)
62 elif s == b'.':
63 output.write(quote(s) + lineEnd)
64 else:
65 output.write(s + lineEnd)
66
67 prevline = None
68 while line := input.readline():

Callers 15

mainFunction · 0.70
demo1Function · 0.70
demo2Function · 0.70
encodeFunction · 0.70
commit_frameMethod · 0.70
write_large_bytesMethod · 0.70
save_reduceMethod · 0.70
save_tupleMethod · 0.70
_batch_appendsMethod · 0.70
_batch_setitemsMethod · 0.70
save_setMethod · 0.70
save_frozensetMethod · 0.70

Calls 2

quoteFunction · 0.70
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…