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

Function latin_1_encode

Lib/_pycodecs.py:93–97  ·  view source on GitHub ↗

None

(obj, errors="strict")

Source from the content-addressed store, hash-verified

91
92
93def latin_1_encode(obj, errors="strict"):
94 """None"""
95 res = PyUnicode_EncodeLatin1(obj, len(obj), errors)
96 res = bytes(res)
97 return res, len(obj)
98
99
100# XXX MBCS codec might involve ctypes ?

Callers

nothing calls this directly

Calls 2

PyUnicode_EncodeLatin1Function · 0.85
lenFunction · 0.85

Tested by

no test coverage detected