20 Sep
2016
20 Sep
'16
7:53 a.m.
On Tue, Sep 20, 2016 at 5:01 PM, אלעזר
But the foo() finds the function to call, so foo.bind() could be made to find it too.
class Demo: def __init__(self): self.bind = 42 def __call__(self): print("I got called!") foo = Demo() You can most certainly call foo(), but foo.bind() will bite you. With a stand-alone function bind(foo), it can use protocols like __call__. ChrisA