MCPcopy Index your code
hub / github.com/python/cpython / deepvalues

Function deepvalues

Lib/http/cookiejar.py:1228–1240  ·  view source on GitHub ↗

Iterates over nested mapping, depth-first

(mapping)

Source from the content-addressed store, hash-verified

1226 return False
1227
1228def deepvalues(mapping):
1229 """Iterates over nested mapping, depth-first"""
1230 for obj in list(mapping.values()):
1231 mapping = False
1232 try:
1233 obj.items
1234 except AttributeError:
1235 pass
1236 else:
1237 mapping = True
1238 yield from deepvalues(obj)
1239 if not mapping:
1240 yield obj
1241
1242
1243# Used as second parameter to dict.get() method, to distinguish absent

Callers 1

__iter__Method · 0.85

Calls 2

listClass · 0.85
valuesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…