Object-oriented programming focuses on mutating the state of objects that interact with each other. A very handy tool to model (and when necessary, mathematically formalize) state transitions in many problems is using a finite-state machine (commonly known as a state machine) First, what's a state machine? A state machine is an abstract machine that has two key components: states and transitions. A state is the current (active) status of a system. For example, if we have a radio receiver, two possible states are tuning on the FM or AM. Another possible state is switching from one FM/AM radio station to another. A transition is the switch from one state to another. A transition is initiated by a triggering event or condition. Usually, an action or set of actions is executed before or after a transition occurs. Assuming that our radio receiver is tuned on the 107 FM station, an example of a transition is the button pressed by the listener to switch to 107.5 FM...
Mastering Python Design Patterns
By :
Mastering Python Design Patterns
By:
Overview of this book
Table of Contents (23 chapters)
Mastering Python Design Patterns
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
The Builder Pattern
The Prototype Pattern
The Adapter Pattern
The Decorator Pattern
The Facade Pattern
The Flyweight Pattern
The Model-View-Controller Pattern
The Proxy Pattern
The Chain of Responsibility Pattern
The Command Pattern
The Interpreter Pattern
The Observer Pattern
The State Pattern
The Strategy Pattern
The Template Pattern
Index
Customer Reviews