def _make_3bit_errors(veclen=24):
 errorvecs = []
 errorvecs.append(([0] * veclen))
 for i in range(veclen):
  vec = ([0] * veclen)
  vec[i] = 1
  errorvecs.append(vec)
 for i in range(veclen):
  for j in range((i + 1), veclen):
   vec = ([0] * veclen)
   vec[i] = 1
   vec[j] = 1
   errorvecs.append(vec)
 for i in range(veclen):
  for j in range((i + 1), veclen):
   for k in range((j + 1), veclen):
    vec = ([0] * veclen)
    vec[i] = 1
    vec[j] = 1
    vec[k] = 1
    errorvecs.append(vec)
 return errorvecs

def _make_3bit_errors ( veclen = 24 ) : errorvecs = [ ] errorvecs . append ( ( [ 0 ] * veclen ) ) for i in range ( veclen ) : vec = ( [ 0 ] * veclen ) vec [ i ] = 1 errorvecs . append ( vec ) for i in range ( veclen ) : for j in range ( ( i + 1 ) , veclen ) : vec = ( [ 0 ] * veclen ) vec [ i ] = 1 vec [ j ] = 1 errorvecs . append ( vec ) for i in range ( veclen ) : for j in range ( ( i + 1 ) , veclen ) : for k in range ( ( j + 1 ) , veclen ) : vec = ( [ 0 ] * veclen ) vec [ i ] = 1 vec [ j ] = 1 vec [ k ] = 1 errorvecs . append ( vec ) return errorvecs
return list of all bitvectors with <= 3 bits as 1s .