This is an old copy of the Python FAQ. The information here may be outdated.

What is a method?

A method is a function on some object x that you normally call as…). Methods are defined as functions inside the class definition:

class C:
    def meth (self, arg):
        return arg*2 + self.attribute

CATEGORY: programming


A Django site. rendered by a django application. hosted by webfaction.