MCPcopy Create free account
hub / github.com/ipython/ipython / update_function

Function update_function

IPython/extensions/autoreload.py:262–268  ·  view source on GitHub ↗

Upgrade the code object of a function

(old, new)

Source from the content-addressed store, hash-verified

260
261
262def update_function(old, new):
263 """Upgrade the code object of a function"""
264 for name in func_attrs:
265 try:
266 setattr(old, name, getattr(new, name))
267 except (AttributeError, TypeError):
268 pass
269
270
271def update_instances(old, new):

Callers 1

autoreload.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected