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

Function make_quoted_pairs

Lib/email/_header_value_parser.py:99–101  ·  view source on GitHub ↗

Escape dquote and backslash for use within a quoted-string.

(value)

Source from the content-addressed store, hash-verified

97
98
99def make_quoted_pairs(value):
100 """Escape dquote and backslash for use within a quoted-string."""
101 return str(value).replace('\\', '\\\\').replace('"', '\\"')
102
103
104def quote_string(value):

Callers 2

quote_stringFunction · 0.85
_refold_parse_treeFunction · 0.85

Calls 2

strFunction · 0.85
replaceMethod · 0.45

Tested by

no test coverage detected