Friday 30 June 2017

Python Accessor or Mutator Methods

Cited from the book "Data Structure and Algorithms in Python"

Some methods return information about the state of an object, but do not change that state. These are known as accessors.

Other methods, such as the sort method of the list class, do change the state of an object. These methods are known as mutators or update methods.

No comments:

Post a Comment