MCPcopy Create free account
hub / github.com/catboost/catboost / encode

Function encode

library/python/strings/strings.py:138–141  ·  view source on GitHub ↗
(value, encoding=DEFAULT_ENCODING)

Source from the content-addressed store, hash-verified

136
137
138def encode(value, encoding=DEFAULT_ENCODING):
139 if isinstance(value, six.binary_type):
140 value = value.decode(encoding, errors='ignore')
141 return value.encode(encoding)
142
143
144class Whence(object):

Callers 5

WriteVarintPackedFunction · 0.85
WriteVarintPackedFunction · 0.85
encodeMethod · 0.85
encodeMethod · 0.85
encodeMethod · 0.85

Calls 3

isinstanceFunction · 0.85
decodeMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected