Self parameter
A self parameter is a method receiver representing the instance or object on which the method operates or is invoked.
Python Workout: 50 ten-minute exercises
self is the conventional first parameter of a Python instance method that refers to the instance on which the method was invoked.
- How it is used
- Uses self to attach state to instances and let inherited methods select instance- or class-specific attributes.
- How deep it goes
- Explains parameter binding, attribute creation, lookup, inheritance, and object initialization, while stopping short of detailed method-binding internals.
- Examples
- Demonstrates Scoop and Person initialization, Foo attribute access, Bowl lookup, and inherited Animal representations.
- What you can do after
- Apply self in instance methods to initialize attributes, access object state, and reuse behavior across subclasses.
Read how Python Workout: 50 ten-minute exercises explains self parameter →
The Quick Python Book, Fourth Edition
self is the conventional first parameter name that refers to the instance on which a Python method is invoked.
- How it is used
- Identifies the current instance when methods initialize or use its fields.
- How deep it goes
- Explains implicit argument passing, explicit class-based calls, and namespace access without descending into method implementation internals.
- Examples
- Uses a circle’s radius and area to distinguish `self.radius` from a local parameter and compare method-call forms.
- What you can do after
- Evaluate/understand it when reading method definitions and calls, including which instance supplies a method’s first argument.
Read how The Quick Python Book, Fourth Edition explains self parameter →
Get Programming: Learn to code with Python
self is the conventional first parameter of a Python instance method that refers to the instance on which the method is called.
- How it is used
- Uses self to connect class methods with each object's data and operations.
- How deep it goes
- Explains declarations, attribute access, automatic argument assignment, and per-instance effects through small class examples.
- Examples
- Uses Circle and Door classes, radius attributes, method calls, independent instances, and short method-writing exercises.
- What you can do after
- Build instance methods that initialize, change, retrieve, and calculate values stored on individual objects.
Read how Get Programming: Learn to code with Python explains self parameter →
Related concepts
- methodused by · A method is a callable operation associated with an object or type and invoked through that association.
- mutable referencecontrasts with · A mutable reference is a reference or handle through which the referenced value or storage location may be modified, subject to language-specific access rules.
- objectequivalent to · A computational object is a runtime entity or structured value representing data, state, or a resource, with properties or operations defined by its programming model.
- attributeuses · An attribute is a named property, value, or piece of information associated with an entity, object, or program element.
- class methodcontrasts with · A class method is a method associated with a class rather than a particular instance and invoked through a class or class-related object.
- static methodcontrasts with · A static method is a function associated with a type or enclosing scope rather than an object instance, and callable without an instance receiver.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


