Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ escape_nonascii
Function
escape_nonascii
Tools/i18n/pygettext.py:212–213 ·
view source on GitHub ↗
(s, encoding)
Source
from the content-addressed store, hash-verified
210
211
212
def
escape_nonascii(s, encoding):
213
return
''
.join(escapes[b]
for
b in s.encode(encoding))
214
215
216
def
normalize(s, encoding):
Callers
1
escape_ascii
Function · 0.85
Calls
2
join
Method · 0.45
encode
Method · 0.45
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…