MCPcopy Create free account
hub / github.com/numpy/numpy / _is_string_like

Function _is_string_like

numpy/lib/_iotools.py:37–45  ·  view source on GitHub ↗

Check whether obj behaves like a string.

(obj)

Source from the content-addressed store, hash-verified

35
36
37def _is_string_like(obj):
38 """
39 Check whether obj behaves like a string.
40 """
41 try:
42 obj + ''
43 except (TypeError, ValueError):
44 return False
45 return True
46
47
48def _is_bytes_like(obj):

Callers 3

drop_fieldsFunction · 0.90
savetxtFunction · 0.85
genfromtxtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected