def nonce_generator(self, nonces): rv = [] for i in xrange(0, len(nonces) - 4, 4): nonce = bytearray_to_uint32(nonces[i:i+4]) if nonce: rv.append(nonce) return rv
def nonce_generator(self, nonces): for i in xrange(0, len(nonces) - 4, 4): nonce = bytearray_to_uint32(nonces[i : i + 4]) if nonce: yield nonce
def nonce_generator(self, nonces): for i in xrange(0, len(nonces) - 4, 4): nonce = bytearray_to_uint32(nonces[i:i+4]) if nonce: yield nonce