(self)
Increment the counter (overflow rolls back to 0).
Increment the counter (overflow rolls back to 0).
Increment the counter ( overflow rolls back to 0 ) .
def increment(self):
        '''Increment the counter (overflow rolls back to 0).'''

        for i in xrange(len(self._counter) - 1, -1, -1):
            self._counter[i] += 1

            if self._counter[i] < 256: break

            # Carry the one
            self._counter[i] = 0

        # Overflow
        else:
            self._counter = [ 0 ] * len(self._counter)
def increment ( self ) : for i in xrange ( len ( self . _counter ) - 1 , - 1 , - 1 ) : self . _counter [ i ] += 1 if self . _counter [ i ] < 256 : break # Carry the one self . _counter [ i ] = 0 # Overflow else : self . _counter = [ 0 ] * len ( self . _counter )