Myvideo

Guest

Login

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

Uploaded By: Myvideo
1 view
0
0 votes
0

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) :- o They are the normal and default case. An instance method must always be called with an instance object.  Using Static Methods and Class Methods. • 2. Static Methods(staticmethod) :- o Definition :- Static Methods are called without an instance argument. Unlike simple functions outside a class, their names are local to the scopes of the class in which they are defined, and they may be looked up by inheritance. o A static method does not receive an implicit first argument. A static method is also a method that is bound to the class an

Share with your friends

Link:

Embed:

Video Size:

Custom size:

x

Add to Playlist:

Favorites
My Playlist
Watch Later