<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/why-oop-exists-ius4je4tc" -->

---
title: Why OOP exists | daily.dev
description: Using a narrative about a college library management project, the core motivations behind object-oriented programming are explained from first principles:...
canonical: https://daily.dev/posts/why-oop-exists-ius4je4tc
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Why OOP exists | daily.dev
og:description: Using a narrative about a college library management project, the core motivations behind object-oriented programming are explained from first principles:...
og:url: https://daily.dev/posts/why-oop-exists-ius4je4tc
og:image: https://api.daily.dev/og/posts/IuS4jE4TC.png
og:image:alt: Why OOP exists
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Why OOP exists

**[Planet Python](https://daily.dev/sources/planetpython)** · 22 min read · 1 upvotes · 0 comments

## Summary

Using a narrative about a college library management project, the core motivations behind object-oriented programming are explained from first principles: representing real-world entities as data plus functions, hiding implementation details behind abstractions, and grouping related functions. The piece walks through building an Author representation from scratch with plain functions and tuples, then progressively introduces Python's class syntax, namespaces, objects, attributes, the dot notation, methods, the __init__ dunder method, and the self convention, showing how each syntactic feature evolved naturally to solve a specific problem.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://mathspp.com/blog/why-oop-exists>

## Questions this post answers

### Why does Python require self as the first parameter of methods defined inside a class?

Self refers to the object instance that a method is being called on, so the method can access and modify that specific object's attributes. Internally, a class is just a namespace for functions, and those functions originally needed an explicit parameter representing the object (like author or book); Python standardized this parameter name as self by convention, and Python automatically passes the calling object as this first argument when a method is invoked using dot notation.

_daily.dev surfaces Python fundamentals like this for developers solidifying their grasp of object-oriented code._

### What does the __init__ method do in a Python class and why is it named that way?

The __init__ method is the initializer Python automatically calls when you create a new object from a class, letting you attach data like first_name or birth_year to the object in one step, e.g. Author("Charles", "Dickens", 1812). It is a regular method like any other; Python just looks for this specific name and calls it automatically. The double underscores mark it as one of Python's special dunder methods, avoiding naming clashes with user-defined methods.

_developers ramping up on python object initialization patterns can find deeper explainers via daily.dev._

## Similar posts on daily.dev

- [Intro to Object-Oriented Programming \(OOP\) in Python – Real Python](https://daily.dev/posts/intro-to-object-oriented-programming-oop-in-python-real-python-r0xdyoqlj) · Real Python · 0 upvotes · 0 comments
- [A defense of object-orientated programming](https://daily.dev/posts/a-defense-of-object-orientated-programming-topcm5gce) · Lobsters · 0 upvotes · 1 comments
- [You Store Data and You Do Stuff With Data • The OOP Mindset](https://daily.dev/posts/you-store-data-and-you-do-stuff-with-data-the-oop-mindset-g9mi6eazf) · Planet Python · 0 upvotes · 0 comments
- [What Is Object-Oriented Programming \(OOP\)? A Beginner-Friendly Guide with Real-Life Examples](https://daily.dev/posts/what-is-object-oriented-programming-oop-a-beginner-friendly-guide-with-real-life-examples-oe65810rz) · Medium · 0 upvotes · 0 comments

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#python](https://daily.dev/tags/python)

[View this post on daily.dev](https://daily.dev/posts/why-oop-exists-ius4je4tc)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Why OOP exists","url":"https://daily.dev/posts/why-oop-exists-ius4je4tc","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/why-oop-exists-ius4je4tc"},"datePublished":"2026-08-26T16:53:29.676Z","dateModified":"2026-09-14T06:07:00.134Z","description":"Using a narrative about a college library management project, the core motivations behind object-oriented programming are explained from first principles:...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6189d0c1e58cf931ea68eb2c919ca313?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6189d0c1e58cf931ea68eb2c919ca313?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Planet Python","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Planet Python","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/eac3cc584cb043b5a242d13752bd3d0c","url":"https://daily.dev/sources/planetpython"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/why-oop-exists-ius4je4tc","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"general-programming,python","timeRequired":"PT22M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Planet Python","item":"https://daily.dev/sources/planetpython"},{"@type":"ListItem","position":3,"name":"Why OOP exists"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/why-oop-exists-ius4je4tc#faq","mainEntity":[{"@type":"Question","name":"Why does Python require self as the first parameter of methods defined inside a class?","acceptedAnswer":{"@type":"Answer","text":"Self refers to the object instance that a method is being called on, so the method can access and modify that specific object's attributes. Internally, a class is just a namespace for functions, and those functions originally needed an explicit parameter representing the object (like author or book); Python standardized this parameter name as self by convention, and Python automatically passes the calling object as this first argument when a method is invoked using dot notation. daily.dev surfaces Python fundamentals like this for developers solidifying their grasp of object-oriented code."}},{"@type":"Question","name":"What does the __init__ method do in a Python class and why is it named that way?","acceptedAnswer":{"@type":"Answer","text":"The __init__ method is the initializer Python automatically calls when you create a new object from a class, letting you attach data like first_name or birth_year to the object in one step, e.g. Author(\"Charles\", \"Dickens\", 1812). It is a regular method like any other; Python just looks for this specific name and calls it automatically. The double underscores mark it as one of Python's special dunder methods, avoiding naming clashes with user-defined methods. developers ramping up on python object initialization patterns can find deeper explainers via daily.dev."}}]}
```

