Object Oriented Programming (OOP) in Python


Not CompletedIntroduction to Classes in Python

For this lesson on object-oriented programming in Python, we are going to take an introductory look at Python classes and we're going to see exactly how we can build a basic class analyze the syntax and then build it out.

Not CompletedGuide to Python's __init__ Constructor Function

Now that you know the basic syntax for creating a class and then a function inside of python in this guide we are going to extend that knowledge and we are going to see how we can add data.

Not CompletedHow to Get and Set Data in a Python Class

When it comes to developing in object-oriented programming languages a couple terms that you are going to hear quite a bit of are going to be getter and setter functions.

Not CompletedHow to Work with Python Properties and Decorators

In the last guide we walked through how we could get and set values inside of a python class but if you remember at the very beginning of the guide I mentioned how the practice of simply overriding and having access to all of the data inside of a class in the way that we did it just like how we were able to grab the data right here and how we're able to set it at any time this is considered in some circles a poor practice.

Not CompletedOverview of Dunder Methods in Python: __init__

So far in this section, you've seen a few of the Dunder methods in Python.

Not CompletedOverview of Dunder Methods in Python: __repr__

In the last guide, we walked through the Dunder string method and the goal of Dunder string once again is to give some pretty output for the values and the details with our class.

Not CompletedHow to Build a Custom Iterator Class in Python

So far in this section we've walked through a number of the Dunder methods that are available in python.

Not CompletedOverview of Iterators vs Generators in Python

In the last guide, we walked through how we could build our own custom iterator. And we saw how we could leverage the tools such as Dunder iter and Dunder next in order to build out an infinite lineup and in many cases that will be the approach that you want to take whenever you need to build your own custom behavior into the iteration process.

Not CompletedClass vs Instance Attributes in Python

Throughout this section on object-oriented programming in Python, we've been working with attributes in relation to classes quite a bit. But for the most part everything that we've done has been related to instance attributes.

Not CompletedIntroduction to Inheritance in Python

One of the fundamental tenants of object-oriented programming in any language is the concept of inheritance. At a high level inheritance is the ability to create specialized versions of classes.

Not CompletedUsing Polymorphism to Build an HTML Generator in Python

In the last guide, we walked through the concept of inheritance in python. Inheritance by itself is a helpful tool but usually you're going to find inheritance is coupled with the concept called polymorphism and that is what we're going to walk through in this guide.

Not CompletedBuilding Polymorphic Functions in Python

In the last guide, we walk through how we could leverage polymorphism in a python program to generate HTML. And that is going to be a common way that you implement inheritance and polymorphism.

Quizzes


Object Oriented Programming (OOP) in Python
    Unsupported Browser

    devCamp does not support ancient browsers.
    Install a modern version for best experience.