Why does setattr fail on a bound method
The short answer: There is no way of adding custom attributes to bound methods. The long answer follows. In Python, there are function objects and method objects. When you define a class, the def statement creates a function object that lives within the class’ namespace: >>> class c: … def m(self): … pass … >>> … Read more