diff --git a/fsl/utils/weakfuncref.py b/fsl/utils/weakfuncref.py index 19a9a3c5db449db41b89388a63820846f3714bcf..37e118566e814da3c5421037377ae02496483ab0 100644 --- a/fsl/utils/weakfuncref.py +++ b/fsl/utils/weakfuncref.py @@ -132,6 +132,11 @@ class WeakFunctionRef(object): return None + def __call__(self): + """See :meth:``function``. """ + return self.function() + + def function(self): """Return a reference to the encapsulated function or method, or ``None`` if the function has been garbage collected.