I'am making my first steps with Python. I have written very simple program, yet it is not working. The error messege is: NameError: name 'fun' is not defined
.
I'm using Spyder and Python 3.7.
class myClass(object):
def __init__(self):
self.a = fun()
def fun(self):
return 10
instance = myClass()