Python Course :- Static & Class Method, Decorator and MetaClass Part-2

Hello Guys, this a Python Course in which we discuss the ’Python Static & Class Method, Decorator and MetaClass’ which analogy to : - • Class-related methods: 1. Instance Methods, passed a self instance object (the default) 2. Static Methods, passed no extra object (via staticmethod) 3. Class Methods, passed a class object (via classmethod, and inherent in metaclasses) • 1. Instance Methods(instance) :-  Using Static Methods and Class Methods. • 2. Static Methods(staticmethod) :-  Static Method Alternatives.  Counting Instances with Static Methods. • 3. Class Method(classmethod) :-  Counting Instances with Class Methods. • Counting Instances per class with class methods. • Decorators:- o What’s a Decorator? o Managing Calls and Instances o Managing Functions and Classes o Using and Defining Decorators o Why Decorators? o Basics  Function Decorators
Back to Top