The Faulty Coder

The fault lies in our code, not our stars

The memory footprint of Python objects
by Anand, post on Wed 01 October 2025

Background

Of late, I was exploring Python again after a while and looking at how classes and instances keep state. Let us look at a simple example of a Python class.

class Person:
    def __init__(self, name, age, gender):
        self.name = name
        self.age = age
        self.gender = gender

Let me …

Read in 14 min read