Open jonathan-benn opened 6 years ago
Here is the proper way for binding self
with replaced function
.
def bind(instance, func, as_name):
'''bind self into instance'''
setattr(instance, as_name, func.__get__(instance, instance.__class__))
It's worth a try. :)
In
Wrapper.py
andstub.py
there is a line# Todo: dirty hack
related to the elementconditions["target"]
. This special case exists for when a new stub is created based on a class (as opposed to an object). We should find a way to remove this dirty hack.