MCPcopy
hub / github.com/cherrypy/cherrypy / ntou

Function ntou

cherrypy/_cpcompat.py:33–39  ·  view source on GitHub ↗

Return the given native string as a unicode string with the given encoding.

(n, encoding='ISO-8859-1')

Source from the content-addressed store, hash-verified

31
32
33def ntou(n, encoding='ISO-8859-1'):
34 """Return the given native string as a unicode string with the given
35 encoding.
36 """
37 assert_native(n)
38 # In Python 3, the native string type is unicode
39 return n
40
41
42def tonative(n, encoding='ISO-8859-1'):

Callers 15

downgrade_wsgi_ux_to_1xFunction · 0.90
_old_process_multipartFunction · 0.90
basic_authFunction · 0.90
json_processorFunction · 0.90
json_inFunction · 0.90
__unicode__Method · 0.90
test_tools.pyFile · 0.90
euroMethod · 0.90
decorated_euroMethod · 0.90
testCombinedToolsMethod · 0.90
testParamsMethod · 0.90
test_encoded_headersMethod · 0.90

Calls 1

assert_nativeFunction · 0.85

Tested by 14

euroMethod · 0.72
decorated_euroMethod · 0.72
testCombinedToolsMethod · 0.72
testParamsMethod · 0.72
test_encoded_headersMethod · 0.72
test_multipartMethod · 0.72
url_with_unicodeMethod · 0.72
unicode_fileMethod · 0.72
test_unicodeMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…