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

Method quote

Lib/email/_header_value_parser.py:284–289  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

282 ], []))
283
284 def quote(self, value):
285 if value.token_type == 'comment':
286 return str(value)
287 return str(value).replace('\\', '\\\\').replace(
288 '(', r'\(').replace(
289 ')', r'\)')
290
291 @property
292 def content(self):

Callers 15

__str__Method · 0.95
docmoduleMethod · 0.80
pathname2urlFunction · 0.80
encode_rfc2231Function · 0.80
_fold_mime_parametersFunction · 0.80
_formatparamFunction · 0.80
escape_pathFunction · 0.80
list_directoryMethod · 0.80
testQuoteMethod · 0.80
setUpMethod · 0.80

Calls 2

strFunction · 0.85
replaceMethod · 0.45

Tested by 15

testQuoteMethod · 0.64
setUpMethod · 0.64
test_never_quoteMethod · 0.64
test_safeMethod · 0.64
test_default_quotingMethod · 0.64
test_quoting_spaceMethod · 0.64
test_quote_bytesMethod · 0.64
test_quotingMethod · 0.64