Module 03 ยท Classes & Typing โ Lesson 4 of 4 ยท ~6 min
Enums & Literal
Closed sets, same philosophy as Swift enums
Swift's enum BookingStatus { case pending, confirmed, ... } makes invalid states unrepresentable โ you can't accidentally pass "pnding" where a BookingStatus is expected. Python has two tools for the same job: Enum classes, and Literal types. The real PawWalk backend uses both.