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

Method __getitem__

mongoengine/base/datastructures.py:457–461  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

455 super().__init__(self.document_type._get_collection_name(), pk)
456
457 def __getitem__(self, name):
458 if not self.passthrough:
459 raise KeyError()
460 document = self.fetch()
461 return document[name]
462
463 def __getattr__(self, name):
464 if not object.__getattribute__(self, "passthrough"):

Callers

nothing calls this directly

Calls 1

fetchMethod · 0.95

Tested by

no test coverage detected