I’m using the following class as an simplified example of what i have. So, how can i call the function beta from alfa without receiving the error : NameError: global name ‘beta’ is not defined
class Test:
def alfa(self):
beta('a')
def beta(something):
print " what i get:"+something
call=Test()
call.alfa()
Should i use global beta after the class declaration? It works if i do it, but i’m not sure if is the correct way to do.
Regards.
self.beta().And beta should take
selfas a parameter, exactly the same asalphadoes.