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

Function make_parenthesis_pairs

Lib/email/_header_value_parser.py:105–108  ·  view source on GitHub ↗

Escape parenthesis and backslash for use within a comment.

(value)

Source from the content-addressed store, hash-verified

103
104
105def make_parenthesis_pairs(value):
106 """Escape parenthesis and backslash for use within a comment."""
107 return str(value).replace('\\', '\\\\') \
108 .replace('(', '\\(').replace(')', '\\)')
109
110
111def quote_string(value):

Callers 1

_refold_parse_treeFunction · 0.85

Calls 2

strFunction · 0.85
replaceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…