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

Function as_list

googlemaps/convert.py:146–154  ·  view source on GitHub ↗

Coerces arg into a list. If arg is already list-like, returns arg. Otherwise, returns a one-element list containing arg. :rtype: list

(arg)

Source from the content-addressed store, hash-verified

144
145
146def as_list(arg):
147 """Coerces arg into a list. If arg is already list-like, returns arg.
148 Otherwise, returns a one-element list containing arg.
149
150 :rtype: list
151 """
152 if _is_list(arg):
153 return arg
154 return [arg]
155
156
157def _is_list(arg):

Callers 3

location_listFunction · 0.85
join_listFunction · 0.85
expandFunction · 0.85

Calls 1

_is_listFunction · 0.85

Tested by

no test coverage detected