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

Function encode

Lib/encodings/utf_8_sig.py:14–16  ·  view source on GitHub ↗
(input, errors='strict')

Source from the content-addressed store, hash-verified

12### Codec APIs
13
14def encode(input, errors='strict'):
15 return (codecs.BOM_UTF8 + codecs.utf_8_encode(input, errors)[0],
16 len(input))
17
18def decode(input, errors='strict'):
19 prefix = 0

Callers 3

encodeMethod · 0.70
test_raw_encodeMethod · 0.50
test_raw_encodeMethod · 0.50

Calls 1

lenFunction · 0.85

Tested by 2

test_raw_encodeMethod · 0.40
test_raw_encodeMethod · 0.40