MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / encode

Function encode

tools/python-3.11.9-amd64/Lib/os.py:756–759  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

754 # Where Env Var Names Can Be Mixed Case
755 encoding = sys.getfilesystemencoding()
756 def encode(value):
757 if not isinstance(value, str):
758 raise TypeError("str expected, not %s" % type(value).__name__)
759 return value.encode(encoding, 'surrogateescape')
760 def decode(value):
761 return value.decode(encoding, 'surrogateescape')
762 encodekey = encode

Callers 1

encodekeyFunction · 0.70

Calls 2

typeClass · 0.50
encodeMethod · 0.45

Tested by

no test coverage detected