def flip(self, *args): random.setstate(self.state) bit = super(SeededCoin, self).flip() self.state = random.getstate() return bit