Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/shadowsocks/shadowsocks
/ to_bytes
Function
to_bytes
shadowsocks/common.py:63–67 ·
view source on GitHub ↗
(s)
Source
from the content-addressed store, hash-verified
61
62
63
def
to_bytes(s):
64
if
bytes != str:
65
if
type(s) == str:
66
return
s.encode(
'utf-8'
)
67
return
s
68
69
70
def
to_str(s):
Callers
3
get_config
Function · 0.90
inet_ntop
Function · 0.85
parse_header
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected