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

Function _encode_base64

Mac/Tools/plistlib_generate_testdata.py:98–104  ·  view source on GitHub ↗
(s, maxlinelength=60)

Source from the content-addressed store, hash-verified

96 print()
97
98def _encode_base64(s, maxlinelength=60):
99 maxbinsize = (maxlinelength//4)*3
100 pieces = []
101 for i in range(0, len(s), maxbinsize):
102 chunk = s[i : i + maxbinsize]
103 pieces.append(binascii.b2a_base64(chunk))
104 return b' '.join(pieces)
105
106main()

Callers 1

mainFunction · 0.70

Calls 2

appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…