so, we already discussed this on IRC but I'll write down the notes:

There are two bugs here. One is that you left out __ne__, which is required to implement the full equality protocol in Python. The != operator doesn't use __eq__, it only uses __ne__.

The second bug is that __eq__ is wrong; it always says that another BoundLog is equal, since "f" is never being passed any arguments -- when self.msg is overwritten, all of the partial arguments are overwritten along with it.

Given the current implementation of BoundLog, the only way I can think of to check for equality is to use the 'inspect' module to look into the default arguments of the .msg function.

An alternative solution would be to change the implementation of BoundLog to not use partial, but rather to store the bound arguments on instance attributes that are much easier to compare.