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

Function replace_method

numpy/distutils/ccompiler.py:89–92  ·  view source on GitHub ↗
(klass, method_name, func)

Source from the content-addressed store, hash-verified

87
88
89def replace_method(klass, method_name, func):
90 # Py3k does not have unbound method anymore, MethodType does not work
91 m = lambda self, *args, **kw: func(self, *args, **kw)
92 setattr(klass, method_name, m)
93
94
95######################################################################

Callers 2

unixccompiler.pyFile · 0.90
ccompiler.pyFile · 0.85

Calls 1

funcFunction · 0.50

Tested by

no test coverage detected