-
Implementing stateful objects or state machines in Python
Author David Beazley , Brian K. Jones
This lesson is a recipe from the Python Cookbook that explores the problem of wanting to implement a state machine or an object that operates in a number of different states, without littering your code with a lot of conditionals. It teaches key solutions such as e....
Release Date 2016/08 -
Making classes support comparison operations in Python
Author David Beazley , Brian K. Jones
This lesson is a recipe from the Python Cookbook that explores being able to compare instances of your class using the standard comparison operators, but without having to write a lot of special methods, and avoiding the tedious task of creating implementations of ....
Release Date 2016/08