Object Oriented Programming (OOP) Tutorial 3 Classmethods and staticmethods (Video 15 min.)

Submitted by marcel.lubbers on
Go back to...
Author(s)
CoreyMS
Description

In this tutorial, you will be learning about class methods and staticmethods.

Classmethods are methods that automatically take the class as the first argument. Class methods can also be used as alternative constructors.

Staticmethods do not take the instance or the class as the first argument. They behave just like normal functions, yet they should have some logical connection to our class.

You'll also have a look at some examples of both of these in order to understand both in depth.