MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / __getitem__

Method __getitem__

pymongo/synchronous/collection.py:284–293  ·  view source on GitHub ↗
(self, name: str)

Source from the content-addressed store, hash-verified

282 return self.__getitem__(name)
283
284 def __getitem__(self, name: str) -> Collection[_DocumentType]:
285 return Collection(
286 self._database,
287 f"{self._name}.{name}",
288 False,
289 self.codec_options,
290 self.read_preference,
291 self.write_concern,
292 self.read_concern,
293 )
294
295 def __repr__(self) -> str:
296 return f"{type(self).__name__}({self._database!r}, {self._name!r})"

Callers 1

__getattr__Method · 0.95

Calls 1

CollectionClass · 0.85

Tested by

no test coverage detected