class A:
pass
def b(self):
print('b')
A.b = b
a = A()
At this point a.b is a bound method object which is great, but if i say:
a.b()
I get an error saying that b needs at least one argument.
My questions are: 1. how does one go about tacking methods onto existing classes? and 2. are there any documented 'best practices' with regard to this sort of thing?