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

Function expand

googlemaps/convert.py:226–229  ·  view source on GitHub ↗
(arg)

Source from the content-addressed store, hash-verified

224 # expand them into individual key/value items, eg:
225 # {"country": ["US", "AU"], "foo": 1} -> "country:AU", "country:US", "foo:1"
226 def expand(arg):
227 for k, v in arg.items():
228 for item in as_list(v):
229 yield "%s:%s" % (k, item)
230
231 if isinstance(arg, dict):
232 return "|".join(sorted(expand(arg)))

Callers 1

componentsFunction · 0.85

Calls 1

as_listFunction · 0.85

Tested by

no test coverage detected