def is_identifier(s):
    """
    An identifier starts with an alphanumeric character (or "_"), and does not
    contain any whitespace characters.
    """
    return (s and (s[0].isalnum() or s[0] == '_') and 
            not any(c.isspace() for c in s[1:]))