DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk3 min

Python Functions vs. Methods: What’s the Difference?

A Python function can be called directly. An instance method is accessed through an object and receives that instance as its first argument; class methods bind the class instead.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A Python function is a callable you can invoke directly; a method is a callable accessed through an object or class attribute. For an ordinary instance method, accessing it through an instance automatically passes that instance as the first argument—usually named self. Class methods bind the class instead, so not every method receives an instance.

Function vs. method: the practical difference

A function can stand on its own:

def double(number):
    return number * 2

double(3)  # 6

A method is accessed through an object, typically with dot notation. For example, append is a list method:

values = []
values.append(3)

The Python Tutorial describes a method as a function that belongs to an object and is named through attribute notation such as obj.methodname. The object’s type defines which methods are available; different types can have methods with the same name. See the Python 3.14 Tutorial, “More Control Flow Tools”.

What happens to the first argument?

When a function is defined in a class and accessed through an instance, Python supplies that instance as the first argument. In this example, greeter.greet("Sam") passes greeter as self:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
class Greeter:
    def greet(self, name):
        return f"Hello, {name}"

greeter = Greeter()
greeter.greet("Sam")

The same call can be written with the instance supplied explicitly: Greeter.greet(greeter, "Sam"). In general, for this ordinary instance-method case, x.f(1) is equivalent to C.f(x, 1) when x is an instance of C. That automatic binding explains why the method definition has a first parameter before the argument supplied in the call. The behavior is described in the Python 3.14 Tutorial, “Classes” and the Python 3.14 Language Reference, “Data model”.

self is a convention, not a keyword

The first parameter is conventionally named self, but Python does not require that spelling. Binding follows from accessing the function through an instance, not from naming the parameter self. The Python Tutorial explicitly says the name has no special meaning to Python. You should still use self in ordinary instance methods because it is the established convention and makes code easier to read.

Methods do not all bind the same way

Instance methods bind an instance

The common case is an instance method such as Greeter.greet: retrieved through an instance, it receives that instance as its first argument.

Class methods bind the class

A method decorated with @classmethod receives the class as its first argument, whether it is retrieved through the class or an instance. In the data model’s terminology, the bound method’s __self__ is the class, rather than a particular instance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A function stored on an instance is not automatically bound

Putting a function directly in an instance attribute does not, by itself, turn it into a bound method. The automatic instance binding described above applies when a function defined in a class is accessed through an instance. The distinction is set out in the Python data model reference.

How to tell which one you are looking at

  • Direct call: double(3) calls a function by its name.
  • Attribute call: values.append(3) accesses a method through an object.
  • Implicit first argument: With an ordinary instance method, obj.method(arg) supplies obj before arg.
  • Class-level call: Class.method(obj, arg) makes that instance argument explicit for an ordinary instance method.
  • Binding target: An instance method binds an instance; a class method binds the class.

In Python’s data model, a bound instance method exposes the object it is bound to as method.__self__ and the original function as method.__func__. These attributes can help when inspecting a method, though everyday calls rarely require them.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why the distinction is useful

When a call seems to be missing an argument, check how the callable was accessed. A function called directly receives the arguments you pass. An ordinary method retrieved from an instance also receives that instance automatically. Conversely, calling the class-level function form without explicitly supplying an instance can leave the method’s first parameter unsatisfied.

The Python documentation’s list example contrasts append() with an expression that builds a new list, result = result + [a]. It presents append() as the more efficient choice in that example; it is not a universal performance claim about methods versus functions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.