what is exactly bound method and unbound method in python. How does it differ when object is created?
i am beginner to python i wrote this small piece of code
class newclass:
def function1(self,var2):
self.var2=var2
print var2
self.fun_var=var2
newobject = newclass
newobject.function1(64)
I am getting error like this
Traceback (most recent call last):
File "basic_class.py", line 8, in <module>
newobject.function1(64)
TypeError: unbound method function1() must be called with newclass instance as first argument (got int instance instead)
what is exactly bound method and unbound method in python