I need to execute a method from a @staticmethod within the same class: the following code returns an error:
NameError: global name 'self' is not defined
class Main:
def __init__(self):
self.start = 0
def prints(self, message):
print (message)
@staticmethod
def sendMessage(message):
self.prints(message)
if __name__ == '__main__':
main = Main()
main.sendMessage('Testing to print from staticmethod')
could someone give me an idea, how to access the prints methods from the statimethod. thank you