Posts From Python OOPS

Understanding The Python Constructor The Init () Method

Understanding the __init__() method in Python

In this article, we discuss a concept of OOPs – The Python Constructor and how explain in detail how we can use __init__() method for initializing an object. What is a constructor? Before we go into the idea of constructor, here is a quick heads up on classes and objects in general: “In OOP, object […]

Duck Typing In Python

Duck Typing in Python

Duck typing is a variation of Dynamic Programming and uses a form of abductive reasoning for type checking. In this article, we will focus on the main intuition of duck typing and examples of ducking typing in python. What is Duck Typing in Python? – Abductive Reasoning The term duck arguably comes from the popular […]


Python classmethod()

Python classmethod() is a built-in function of the Python standard library! There are three types of methods in Python: Instance Method Class Method Static Method Here, in this article, we’re going to discuss and focus on the class method of Python. So let’s get started. What is a Python classmethod()? A Python classmethod() can be […]

Closures In Python

Closures in Python – A Practical Reference

In this tutorial, we will see what are closures in Python, when do they exist and how do we use them. To understand the concept of closures, we need to understand some basic concepts like nested functions and free variables. Then we will see the implementation of closures in Python, the conditions for closures to […]


What does “Immutable” mean in Python?

What does immutable mean in Python where every entity is an object? Unlike some other programming languages, where you need to explicitly specify the type of data you’re assigning to a variable, Python doesn’t require that. Instead, it automatically assigns the data type depending on the value you provide. In short, each variable holds an […]


Python Class Attribute and Instance Attribute

In this article, we will be focusing on Python Class Attribute and Instance Attribute. Attributes are the key-players of a programming language. They are responsible for holding important data values and also help in data manipulation. Let us now get started! Understanding Python Class Attribute Python Class Attribute is an attribute/variable that is enclosed within […]