In Resolver One on IronPython 1, we have code to unhook events that uses an object that is equal to everything like this:<br>e = EqualToAll()<br>for _ in range(100):<br>&nbsp;&nbsp;&nbsp; event -= e<br><br>What we have discovered when we run under IPy2, is that the __eq__ method on EqualToAll is only called when the target of the event is a lambda, a function or a callable object but not when it&#39;s a method.<br>
<br>Is there a better way to unhook all events or get a list of currently subscribed targets? For the moment, we&#39;re going to wrap our event targets in lambdas as a way to move forward, but the whole EqualToAll and arbitrary looping seems a little dirty anyway.<br>
<br>Thanks<br>Glenn &amp; Will<br>