class Hello:
def load(self):
self.open('World')
@classmethod
def open(cls,print_string):
print 'Hello ' + print_string
class Hello:
def load(self):
Hello.open('World')
@classmethod
def open(cls,print_string):
print 'Hello ' + print_string
I am finding difficult to understand from above two classes different style of calling class method. One uses self and another class name while calling, when should one use first and when should the second be used?
Good explanation will really clarify @classmethod concept.