The BoundMethodWeakref class is accessible via the sqlobject.include.pydispatch.saferef module.
BoundMethodWeakref objects provide a mechanism for referencing a bound method without requiring that the method object itself (which is normally a transient object) is kept alive. Instead, the BoundMethodWeakref object keeps weak references to both the object and the function which together define the instance method.
weakSelf -- weak reference to the target object weakFunc -- weak reference to the target function
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
Return a weak-reference-like instance for a bound method
reference, must have im_self and im_func attributes and be reconstructable via:
target.im_func.__get__( target.im_self )
which is true of built-in instance methods.
Calculate the reference key for this reference
Currently this is a two-tuple of the id()'s of the target object and the target function respectively.
Return a strong reference to the bound method
If the target cannot be retrieved, then will return None, otherwise returns a bound instance method for our object and function.
See the source for more information.