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

Method find

Tools/c-analyzer/c_parser/info.py:1548–1572  ·  view source on GitHub ↗
(self, *key, **explicit)

Source from the content-addressed store, hash-verified

1546 # self._add_decl(decl, key)
1547
1548 def find(self, *key, **explicit):
1549 if not key:
1550 if not explicit:
1551 return iter(self)
1552 return self._find(**explicit)
1553
1554 resolved, extra = self._resolve_key(key)
1555 filename, funcname, name = resolved
1556 if not extra:
1557 kind = None
1558 elif len(extra) == 1:
1559 kind, = extra
1560 else:
1561 raise KeyError(f'key must have at most 4 parts, got {key!r}')
1562
1563 implicit= {}
1564 if filename:
1565 implicit['filename'] = filename
1566 if funcname:
1567 implicit['funcname'] = funcname
1568 if name:
1569 implicit['name'] = name
1570 if kind:
1571 implicit['kind'] = kind
1572 return self._find(**implicit, **explicit)
1573
1574 def _find(self, filename=None, funcname=None, name=None, kind=None):
1575 for decl in self._decls.values():

Callers 8

tokenizeFunction · 0.45
getmakevarsFunction · 0.45
getsetupinfoFunction · 0.45
expandvarsFunction · 0.45
get_build_versionFunction · 0.45
get_build_architectureFunction · 0.45
get_build_versionFunction · 0.45
get_msvcrFunction · 0.45

Calls 2

_findMethod · 0.95
_resolve_keyMethod · 0.95

Tested by

no test coverage detected