In this tutorial, we take a clear, practical look at methods inside Python classes, focusing especially on how parameters are passed — and why the self parameter is essential for correct object‑oriented behaviour. The video begins by examining a method that appears correct but fails at runtime, revealing the common beginner mistake: forgetting that Python automatically passes the object’s ID into every instance method.
You’ll see how a method like double_it(value) fails because, as the transcript explains, “double it takes one positional argument but two were given.” The missing self is the cause, and adding it immediately fixes the method. The tutorial then expands to a second example with two parameters, showing how Python implicitly passes the object instance first, meaning the method must always define one extra parameter.
The video also demonstrates a technique that works but breaks object‑oriented principles — calling a method directly on the class without creating an object. As the transcript notes, “this doesn’t fit in with object‑orientated programming… the purpose of a class is to allow for instances of the class to be created.” You’ll learn why this approach is discouraged and why proper OOP design relies on objects sending messages to each other.
What you’ll learn:
Why Python methods require self
How Python automatically passes the object instance into methods
How missing self causes positional‑argument errors
How to correctly define methods with multiple parameters
Why class‑direct method calls work but break OOP principles
The importance of creating objects when writing object‑oriented Python
This video is ideal for beginners learning Python OOP and anyone wanting a clear, visual explanation of how method parameters — especially self — really work behind the scenes.. #JohnPhilipJones