Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Because you already know about functions, you also know about
methods in classes. Methods are just function objects created by
def statements nested in a class statement’s body. From an abstract
perspective, methods provide behavior for instance objects to inherit.
From a programming perspective, methods work in exactly the same way
as simple functions, with one crucial exception: a method’s first
argument always receives the instance object that is the implied
subject of the method call.
In other words, Python automatically maps instance method calls to class method functions as follows. Method calls made through an instance, like this:
instance.method(args...)