Object Oriented Programming in Python
Learn Python OOP! Master concepts, syntax, and inheritance with practical examples. Build robust and reusable code.
Course Content
Object Oriented Programming in Python is an intermediate-level Udemy course taught by Kumail Raza. It runs 1h 13m, is taught in English, and includes a certificate of completion. Learners rate it 5.0 out of 5 from 3 reviews, with 8 students enrolled. It is a paid course, first published September 2022.
Understanding Object-Oriented Programming (OOP)
Dive into the world of Object-Oriented Programming (OOP), a powerful programming paradigm centered around the concept of "objects." OOP structures software design around objects, which bundle together both data (represented as attributes or properties) and the code that operates on that data (known as methods or procedures). A key characteristic is an object's ability to access and modify its own data, a concept often referred to as "self."
In OOP, complex computer programs are built by assembling interacting objects. While various OOP languages exist, class-based languages are prevalent. Here, objects are created as instances of classes, which define their characteristics and types. Many popular programming languages, including C++, Java, and Python, are multi-paradigm, meaning they support OOP alongside other programming styles like imperative and procedural. You'll find varying degrees of OOP support across these languages.
This course offers a fresh perspective on Object-Oriented Programming in Python. You'll gain a deep understanding of core OOP principles and practical applications.
Here's what you'll learn:
- Inheritance: Leverage inheritance to create new classes based on existing ones, promoting code reusability and establishing hierarchical relationships.
- Object Resolution Method: Master the mechanisms for resolving method calls within objects, ensuring the correct method is executed.
- Multiple Inheritance and Multi-level Inheritance: Explore advanced inheritance techniques for complex class structures.
- Operator Overloading: Customize the behavior of operators (like +, -, *, /) for your own classes, making your code more intuitive and readable.
Operator Overloading in Python: A Closer Look
Python allows you to redefine how operators function with user-defined classes. Here are some common examples:
| Operator | Expression | Internally |
|---|---|---|
| Addition | p1 + p2 |
p1.__add__(p2) |
| Subtraction | p1 - p2 |
p1.__sub__(p2) |
| Multiplication | p1 * p2 |
p1.__mul__(p2) |
| Power | p1 ** p2 |
p1.__pow__(p2) |
| Division | p1 / p2 |
p1.__truediv__(p2) |
Need a web app built? Hire the team behind TutorialSearch.io
We ship fast, production-grade full-stack apps (Next.js, React, edge infra) — the same stack that powers this site.