This Python OOP explains to you the Python object-oriented programming clearly so that you can apply it to develop software more effectively.
By the end of this Python OOP module, you’ll have good knowledge of object-oriented principles. And you’ll know how to use Python syntax to create reliable and robust software applications.
What you’ll learn
- Create objects in Python by defining classes and methods.
- Extend classes using inheritance.
- Understand when to use object-oriented features, and more importantly when not to use them.
Who this tutorial is for
If you’re new to object-oriented programming techniques, or if you have basic Python skills and wish to learn in-depth how and when to correctly apply OOP in Python, this is the tutorial for you.
If you already know the object-oriented programming in other languages such as C# or Java, you’ll learn how these techniques work in Python.
Section 1. Encapsulation
- Classes and objects – learn how to define a class and create new objects from the class.
- __init__() method – show you how to define a constructor for a class by using the __init__() method.
- Instance & class attributes – understand instance attributes and class attributes, and more importantly when you should use class attributes.
- Private attributes – learn about private attributes and how to use them effectively.
- Properties – show you how to use the @property decorate to define properties for a class.
- Static methods – explain to you static methods and shows you how to use them to group related functions in a class.