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

Method _make_map

Lib/test/test_exception_hierarchy.py:70–81  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

68 +-- TimeoutError ETIMEDOUT
69 """
70 def _make_map(s):
71 _map = {}
72 for line in s.splitlines():
73 line = line.strip('+- ')
74 if not line:
75 continue
76 excname, _, errnames = line.partition(' ')
77 for errname in filter(None, errnames.strip().split(', ')):
78 if errname == "ENOTCAPABLE" and not hasattr(errno, errname):
79 continue
80 _map[getattr(errno, errname)] = getattr(builtins, excname)
81 return _map
82 _map = _make_map(_pep_map)
83
84 def test_errno_mapping(self):

Callers

nothing calls this directly

Calls 5

filterFunction · 0.50
splitlinesMethod · 0.45
stripMethod · 0.45
partitionMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected