Can We Add Objects the Way We Do for Numbers?

Konu

The Python programming language

Tür

Talk

Seviye

beginner

Dil

English

Oda

Main Stream

Başlangıç

2025-12-06T05:50:00Z

Bitiş

2025-12-06T06:10:00Z

Süre

20 dakika

Özet

When we define our own classes in Python, they often don’t behave like built-in types especially when we try to use operators like +. In this short talk, we’ll look at how to fix that by using Python’s special methods. With a hands-on example using \_\_add\_\_ , we’ll see how to make our objects work the way we expect, and why this improves code readability and maintainability. A useful tool in your Python toolkit, even if you're not writing mathematical code.

Konuşmacılar

Swarooprani Manoor
KLS Gogte Institute of Technology