line 1 should be: previous = {0: 1, 1: 1}: NOT previous = {0: 0, 1: 1}
Bug watches keep track of this bug in other bug trackers.