class Dog:
def eat(self):
print('dog is eating')
def drink(self):
print('dog is drinking')
@classmethod
def speak(cls):
print(cls)
print('dog is speaking')
print(Dog.speak)
Dog.speak()
C:\Users\user\AppData\Local\Programs\Python\Python36\python.exe “C:/Users/user/PycharmProjects/hellow python/test.py”
<bound method Dog.speak of <class ‘main.Dog’>>
<class ‘main.Dog’>
dog is speaking
Process finished with exit code 0