def _sqlite_bytelower(bytestring):
 if (not six.PY2):
  return bytestring.lower()
 return buffer(bytes(bytestring).lower())

def _sqlite_bytelower ( bytestring ) : if ( not six . PY2 ) : return bytestring . lower ( ) return buffer ( bytes ( bytestring ) . lower ( ) )
a custom bytelower sqlite function so we can compare bytestrings in a semi case insensitive fashion .