Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ escape
Method
escape
Lib/pydoc.py:565–566 ·
view source on GitHub ↗
(self, text)
Source
from the content-addressed store, hash-verified
563
self.maxstring = self.maxother = 100
564
565
def
escape(self, text):
566
return
replace(text,
'&'
,
'&'
,
'<'
,
'<'
,
'>'
,
'>'
)
567
568
def
repr(self, object):
569
return
Repr.repr(self, object)
Callers
15
repr1
Method · 0.95
repr_string
Method · 0.95
repr_instance
Method · 0.95
preformat
Method · 0.80
docmodule
Method · 0.80
docclass
Method · 0.80
docroutine
Method · 0.80
html_navbar
Function · 0.80
html_error
Function · 0.80
_find_lineno
Method · 0.80
check_output
Method · 0.80
_guess_quote_and_delimiter
Method · 0.80
Calls
1
replace
Function · 0.70
Tested by
15
_find_lineno
Method · 0.64
check_output
Method · 0.64
escapestr
Function · 0.64
test_with_two_commas_in_format_specifier
Method · 0.64
test_with_two_underscore_in_format_specifier
Method · 0.64
test_with_a_commas_and_an_underscore_in_format_specifier
Method · 0.64
test_with_an_underscore_and_a_comma_in_format_specifier
Method · 0.64
test_better_error_message_format
Method · 0.64
test_unicode_in_error_message
Method · 0.64
test_specifier_z_error
Method · 0.64
test_setstate
Method · 0.64
_check_import_error
Method · 0.64