Exemplo n.º 1
0
Arquivo: bits.py Projeto: eblot/pyftdi
 def _cmp(self, other):
     # the bit sequence should be of the same length
     ld = len(self) - len(other)
     if ld:
         return ld
     for n, (x, y) in enumerate(zip(self._seq, other.sequence()), start=1):
         if xor(x, y):
             return n
     return 0
Exemplo n.º 2
0
 def _cmp(self, other):
     # the bit sequence should be of the same length
     ld = len(self) - len(other)
     if ld:
         return ld
     for n, (x, y) in enumerate(zip(self._seq, other.sequence()), start=1):
         if xor(x, y):
             return n
     return 0