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

Function str_encode

Lib/test/test_urlparse.py:1991–1994  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

1989
1990
1991def str_encode(s):
1992 if s is None:
1993 return None
1994 return s.encode('ascii')
1995
1996def tuple_encode(t):
1997 return tuple(str_encode(x) for x in t)

Callers 10

test_roundtripsMethod · 0.85
test_http_roundtripsMethod · 0.85
checkJoinMethod · 0.85
test_unparse_parseMethod · 0.85
test_RFC2732Method · 0.85
test_RFC2732_invalidMethod · 0.85
test_urldefragMethod · 0.85
tuple_encodeFunction · 0.85

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…