Skip to content

Tag Archives: python-oop-concepts

In this article, we will discuss data hiding in Python, starting from data hiding in general to data hiding in Python, along with the advantages… Read More
Metaclasses are classes that generate other classes. It is an efficient tool for class verification, to prevent sub class from inheriting certain class function, and… Read More
Prerequisite – Classes and Objects in Python This article will compare and highlight the features of is-a relation and has-a relation in Python. What is… Read More
Prerequisite – Constructors, @classmethod decorators Python does not support explicit multiple constructors, yet there are some ways using which the multiple constructors can be achieved.… Read More
DataClasses has been added in a recent addition in python 3.7 as a utility tool for storing data. DataClasses provides a decorator and functions for… Read More
In programming, Polymorphism is a concept of Object-Oriented Programming. It enables using a single interface with the input of different data types, different classes or… Read More
We can access the member of one class inside a class using these 2 concepts:  By Composition(Has-A Relation) By Inheritance(Is-A Relation) Here we will study… Read More
Python has a library called attrs which makes code written in an object-oriented mode much easier and concise. In a class that has data, it… Read More
The NamedTuple class of the typing module added in Python 3.6 is the younger sibling of the namedtuple class in the collections module. The main… Read More
It happens most of the time that given a condition we need to decide whether a particular class should inherit a class or not, for… Read More
Dataclasses is an inbuilt Python module which contains decorators and functions for automatically adding special methods like __init__() and __repr__() to user-defined classes. Dataclass Object… Read More
Have you ever thought about checking whether the objects you are using adheres to a particular specification? It is necessary to verify whether an object… Read More
Class Attribute: Class Attributes are unique to each class. Each instance of the class will have this attribute.  Example: Python3 # declare a class class… Read More
Prerequisite: Basics of OOPs in Python In this article, we will learn how to access object methods and attributes within other objects in Python. If… Read More
The key concept of python is objects. Almost everything in python is an object, which includes functions and as well as classes. As a result,… Read More