-0 == 0. So if backspaces is zero then self.phrase becomes text because self.phrase[0:0] is the empty string.

Is that the intended behavior?