+ 1

What does this do "@classmethod"

@classmethod

31st Dec 2020, 9:17 AM
Ziead Shab Kalieh
Ziead Shab Kalieh - avatar
3 Answers
+ 2
Ziead Shab Kalieh When you want to call a method without creating an object of the class then we use @classmethod. You can see in example we have called method directly with class.
31st Dec 2020, 1:56 PM
A͢J
A͢J - avatar
31st Dec 2020, 9:52 AM
A͢J
A͢J - avatar
+ 1
It's to create an instance of a class. Why? Where do we use it? I Am Groot !
31st Dec 2020, 12:03 PM
Ziead Shab Kalieh
Ziead Shab Kalieh - avatar