Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set your subtitle preferences in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please refer to our video player troubleshooting guide for assistance.

Using Python Class Constructors (Overview)

Class constructors are a fundamental part of object-oriented programming in Python. They allow you to create and properly initialize objects of a given class, making those objects ready to use. Class constructors internally trigger Python’s instantiation process, which runs through two main steps: instance creation and instance initialization.

If you want to dive deeper into how Python internally constructs objects and learn how to customize the process, then this video course is for you.

In this video course, you’ll:

  • Understand Python’s internal instantiation process
  • Customize object initialization using .__init__()
  • Fine-tune object creation by overriding .__new__()

With this knowledge, you’ll be able to tweak the creation and initialization of objects in your custom Python classes, which will give you control over the instantiation process at a more advanced level.

To better understand the examples and concepts in this tutorial, you should be familiar with object-oriented programming and special methods in Python.

Download

Sample Code (.zip)

2.2 KB
Download

Course Slides (.pdf)

4.9 MB

Become a Member to join the conversation.