Jan Kaliszewski schrieb am Do, 20. Okt 2011, um 02:19:22 +0200:
def register(self, callback): self.cleanup_callbacks.append(callback)
We should probably accept additional *args and **kwargs which will be passed on to the callback, similar to atexit.register(). And possibly add an unregister() method in analogy to atexit.unregister() as well?
Cheers, Sven