def safe_email(email):
 if (EMAIL_REGEX.match(email) is not None):
  return ((not email.startswith('.')) and ('..' not in email))
 else:
  logger.warning('Invalid email address: %s.', email)
  return False

def safe_email ( email ) : if ( EMAIL_REGEX . match ( email ) is not None ) : return ( ( not email . startswith ( '.' ) ) and ( '..' not in email ) ) else : logger . warning ( 'Invalid email address: %s.' , email ) return False
scrub email address before using it .