Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/numpy/numpy
/ b
Function
b
tools/npy_tempita/compat3.py:21–24 ·
view source on GitHub ↗
(s)
Source
from the content-addressed store, hash-verified
19
else
:
20
21
def
b(s):
22
if
isinstance(s, str):
23
return
s.encode(
'latin1'
)
24
return
bytes(s)
25
26
def
iteritems(d, **kw):
27
return
iter(d.items(**kw))
Callers
nothing calls this directly
Calls
1
encode
Method · 0.80
Tested by
no test coverage detected