I want to access a method variable from within the class (not the same method)
def MyDef():
class MyClass():
def meth1(self):
meth2(7)
def meth2(self, user_value):
value = 5 - 6*user_value
if value > 2:
# do something
MyDef()
I get the following error:
NameError: name 'value' is not defined.
Can someone please help me?