Python Part-20 (class and static methods), use of @classmethod and @staticmethod
Автор: Varteta Learning Platform
Загружено: 2020-03-12
Просмотров: 82
#classmethod
#staticmethod
About class and static methods.
@classmethod is used for the class methods and no need of any attribute decorator for class level variables.
Takes class name as the first argument and not the reference to the instance unlike for normal methods.
@staticmethod used for static methods not having any relation to class or reference of the instannce of a class. They are just utility functions.
_str_ method override in your class to display the information you want to display
References:
https://www.tutorialspoint.com/class-...
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: