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

Method quote

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

Source from the content-addressed store, hash-verified

289 ], []))
290
291 def quote(self, value):
292 if value.token_type == 'comment':
293 return str(value)
294 return str(value).replace('\\', '\\\\').replace(
295 '(', r'\(').replace(
296 ')', r'\)')
297
298 @property
299 def content(self):

Callers 15

__str__Method · 0.95
print_envFunction · 0.80
print_envFunction · 0.80
update_test_planFunction · 0.80
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

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