In Python, I\'m trying to run a method in a class and I get an error:
Traceback (most recent call last): File \"C:\\Users\\domenico\\Desktop\\py\\main.py\"
f is an (instance) method. However, you are calling it via fibo.f, where fibo is the class object. Hence, f is unbound (not bound to any class instance).
f
fibo.f
fibo
If you did
a = fibo() a.f()
then that f is bound (to the instance a).
a