init and repr
__init__ is the constructor. Python calls it after creating a new instance to give the class a chance to populate attributes. def __init__(self, x, y): self.x = x; self.y = y is the canonical pattern.
__repr__ defines what repr(obj) returns and what the REPL shows when you evaluate an instance. The convention is to return a string that, if you typed it back at a Python prompt, would reconstruct the object: Point(3, 4).
A good __repr__ is one of the cheapest debugging tools you can write. When something goes wrong and you log a list of your objects, repr is what produces the output. Spending two minutes writing it pays off the first time you have to inspect a bug.