MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / _get_items_from_dict

Method _get_items_from_dict

mongoengine/dereference.py:83–94  ·  view source on GitHub ↗
(items)

Source from the content-addressed store, hash-verified

81 return new_items
82
83 def _get_items_from_dict(items):
84 new_items = {}
85 for k, v in items.items():
86 value = v
87 if isinstance(v, list):
88 value = _get_items_from_list(v)
89 elif isinstance(v, dict):
90 value = _get_items_from_dict(v)
91 elif not isinstance(v, (DBRef, Document)):
92 value = field.to_python(v)
93 new_items[k] = value
94 return new_items
95
96 if not hasattr(items, "items"):
97 items = _get_items_from_list(items)

Callers

nothing calls this directly

Calls 2

itemsMethod · 0.80
to_pythonMethod · 0.45

Tested by

no test coverage detected