MCPcopy Create free account
hub / github.com/numpy/numpy / _dict_append

Function _dict_append

numpy/distutils/core.py:55–71  ·  view source on GitHub ↗
(d, **kws)

Source from the content-addressed store, hash-verified

53 numpy_cmdclass['egg_info'] = egg_info.egg_info
54
55def _dict_append(d, **kws):
56 for k, v in kws.items():
57 if k not in d:
58 d[k] = v
59 continue
60 dv = d[k]
61 if isinstance(dv, tuple):
62 d[k] = dv + tuple(v)
63 elif isinstance(dv, list):
64 d[k] = dv + list(v)
65 elif isinstance(dv, dict):
66 _dict_append(dv, **v)
67 elif is_string(dv):
68 assert is_string(v)
69 d[k] = v
70 else:
71 raise TypeError(repr(type(dv)))
72
73def _command_line_ok(_cache=None):
74 """ Return True if command line does not contain any

Callers 1

setupFunction · 0.85

Calls 1

is_stringFunction · 0.90

Tested by

no test coverage detected