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

Method __getitem__

Lib/importlib/metadata/__init__.py:324–331  ·  view source on GitHub ↗

Get the EntryPoint in self matching name.

(self, name: str)

Source from the content-addressed store, hash-verified

322 __slots__ = ()
323
324 def __getitem__(self, name: str) -> EntryPoint: # type: ignore[override] # Work with str instead of int
325 """
326 Get the EntryPoint in self matching name.
327 """
328 try:
329 return next(iter(self.select(name=name)))
330 except StopIteration:
331 raise KeyError(name)
332
333 def __repr__(self):
334 """

Callers

nothing calls this directly

Calls 1

selectMethod · 0.95

Tested by

no test coverage detected