I know that if I defer a function and pass some args to it, the function has those args and can work with them, but can a function that's part of an instanced object (for example) access the variables of its object?
class foo (object):
def __init__ (self):
self.bar = 42
def do_work (self):
self.bar += 1
baz = foo()
deferred.defer(baz.do_work)
Would I basically have to give the function all information it would need as arguments?
Also, would baz be trashed if the only reference to it were in a deferred function?