Login
📚 Introduction to Python Programming
Chapters ▾
⇩ Download ▾

11.3 Instance methods

Learning objectives

By the end of this section you should be able to

  • Create and implement __init__ with multiple parameters including default parameter values.
  • Describe what information an instance method has access to and can modify.

More about __init__

In Python, __init__ is the special method that creates instances. __init__ must have the calling instance, self, as the first parameter and can have any number of other parameters with or without default parameter values.

Instance methods

An instance method is used to access and modify instance attributes as well as class attributes. All methods shown so far, and most methods defined in a class definition, are instance methods.