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

Method encode

Lib/codecs.py:141–158  ·  view source on GitHub ↗

Encodes the object input and returns a tuple (output object, length consumed). errors defines the error handling to apply. It defaults to 'strict' handling. The method may not store state in the Codec instance. Use StreamWriter for codec

(self, input, errors='strict')

Source from the content-addressed store, hash-verified

139
140 """
141 def encode(self, input, errors='strict'):
142
143 """ Encodes the object input and returns a tuple (output
144 object, length consumed).
145
146 errors defines the error handling to apply. It defaults to
147 'strict' handling.
148
149 The method may not store state in the Codec instance. Use
150 StreamWriter for codecs which have to keep state in order to
151 make encoding efficient.
152
153 The encoder must be able to handle zero length input and
154 return an empty object of the output object type in this
155 situation.
156
157 """
158 raise NotImplementedError
159
160 def decode(self, input, errors='strict'):
161

Callers 15

_write_file_prefixFunction · 0.45
create_archiveFunction · 0.45
get_source_segmentFunction · 0.45
encodeFunction · 0.45
fsencodeFunction · 0.45
_raw_inputFunction · 0.45
__new__Method · 0.45
__new__Method · 0.45
openMethod · 0.45
_write_chunkMethod · 0.45
_format_html_pageMethod · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by 2

outMethod · 0.36
_toAsciiMethod · 0.36