Jun 01
Python Dunder Methods — __init__, __str__, __call__ and Friends
Dunder (double-underscore) methods let your objects hook into Python’s built-in operations. They’re what makes len(obj), str(obj), …
Type to search…
Dunder (double-underscore) methods let your objects hook into Python’s built-in operations. They’re what makes len(obj), str(obj), …
Three ways to define a function inside a class. Each serves a different purpose. class Demo: # ── Instance method (no decorator) ── def regular(self, …