rebind the 'name' on the 'namespace' to the 'value',
possibly and remember the original value. Multiple
invocations to the same namespace/name pair will
remember a list of old values.
def patch(namespace, name, value):
origin:<UNKNOWN>
where:
exceptions that might appear during execution:
function source:
def patch(namespace, name, value):
""" rebind the 'name' on the 'namespace' to the 'value',
possibly and remember the original value. Multiple
invocations to the same namespace/name pair will
remember a list of old values.
"""
nref = (namespace, name)
orig = getattr(namespace, name)
patched.setdefault(nref, []).append(orig)
setattr(namespace, name, value)
return orig
called in /home/johnny/projects/merlinux/py/dist/py/magic/testing/test_patch.py
called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py
called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py
called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py
called in /home/johnny/projects/merlinux/py/dist/py/magic/testing/test_patch.py
called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py
called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py
called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py
called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py
called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py
called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py
called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py
called in /home/johnny/projects/merlinux/py/dist/py/magic/invoke.py
called in None</home/johnny/projects/merlinux/py/dist/py/test/raises.py:20>
called in /home/johnny/projects/merlinux/py/dist/py/test/deprecate.py
called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py
called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py
called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py
called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py
called in /home/johnny/projects/merlinux/py/dist/py/test/deprecate.py
called in /home/johnny/projects/merlinux/py/dist/py/magic/testing/test_patch.py