Keeping state consistent

Chapter 2 of 4 · 5 lessons

Prerequisite: Finding a home for state, plus Python conditionals and exceptions. Each Python block runs independently.

A class can collect data, but that alone does not guarantee useful data. We will define a condition that should remain true, put checks at the points where state enters or changes, and examine where Python’s conventions and copying have limits.

  1. Describe the condition first
  2. Make supported changes visible
  3. Understand the boundary
  4. Keep a collection from leaking
  5. When two objects take part

Continue to Designing collaboration.