What is the difference classmethod and staticmethod? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 2

What is the difference classmethod and staticmethod?

21st Dec 2021, 10:49 AM
maryam el issati
2 ответов
+ 2
Class Method: Takes reference to class (cls) instead of an instance (self) Static Method: You call it like a normal function ClassName.StaticMethod() without instantciating
21st Dec 2021, 12:18 PM
William M
William M - avatar