Python Arena

Module 35

Defining methods

Giving your classes methods. Methods that work out values from an object's attributes, methods that change the object, and methods that keep the object's data valid, with helper methods and local variables.

Steps

  1. Methods in a class
  2. Methods that change the object
  3. Keeping the object valid
  4. Helper methods and local variables