(original) (raw)
On 31 maj 2013, at 01:47, Łukasz Langa <lukasz@langa.pl> wrote:
class State:
def \_\_init\_\_(self):
self.add.register(int, self.add\_int)
Ouch, I realized this is wrong just after I hit "Send". self.add is a staticmethod so this registration will overload on every instance. Which is obviously bad.
Lesson learned: don't post code at 2 AM.