MCPcopy Index your code
hub / github.com/googlemaps/google-maps-services-python / _is_list

Function _is_list

googlemaps/convert.py:157–163  ·  view source on GitHub ↗

Checks if arg is list-like. This excludes strings and dicts.

(arg)

Source from the content-addressed store, hash-verified

155
156
157def _is_list(arg):
158 """Checks if arg is list-like. This excludes strings and dicts."""
159 if isinstance(arg, dict):
160 return False
161 if isinstance(arg, str): # Python 3-only, as str has __iter__
162 return False
163 return _has_method(arg, "__getitem__") if not _has_method(arg, "strip") else _has_method(arg, "__iter__")
164
165
166def is_string(val):

Callers 3

normalize_lat_lngFunction · 0.85
as_listFunction · 0.85
sizeFunction · 0.85

Calls 1

_has_methodFunction · 0.85

Tested by

no test coverage detected