Skip to content
Snippets Groups Projects
Commit d6f1efab authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

Don't know why I didn't add this originally. WeakFunctionRef instance can be

called() to get the function.
parent a05d9a70
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment