Closed coldfix closed 10 years ago
The standard expectation for methods is that you can equivalently call them via class access (i.e. Foo().method() is the same as Foo.method(Foo()):
Foo().method()
Foo.method(Foo())
from observed import event class Foo(object): @event def bar(self, arg): pass def baz(arg): print("baz", arg) def inga(inst, arg): print("inga", arg) foo = Foo() foo.bar.addObserver(baz) Foo.bar.addObserver(inga) foo.bar(1) # ("baz", 1) Foo.bar(foo, 2) # ("inga", 2)
This equivalence is a very important property that is relied upon in many circumstances. Again, I am noticing this so fast, only because I already noticed and fixed it in obsub ;)
I believe this is now fixed in the dedicated-classes branch.
dedicated-classes
The standard expectation for methods is that you can equivalently call them via class access (i.e.
Foo().method()
is the same asFoo.method(Foo())
:This equivalence is a very important property that is relied upon in many circumstances. Again, I am noticing this so fast, only because I already noticed and fixed it in obsub ;)