def email(prompt=None, empty=False, mode="<STR_LIT>"):
if mode == "<STR_LIT>":<EOL><INDENT>s = _prompt_input(prompt)<EOL>if empty and not s:<EOL><INDENT>return None<EOL><DEDENT>else:<EOL><INDENT>if RE_EMAIL_SIMPLE.match(s):<EOL><INDENT>return s<EOL><DEDENT>else:<EOL><INDENT>return email(prompt=prompt, empty=empty, mode=mode)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>raise ValueError<EOL><DEDENT>
Prompt an email address.

    This check is based on a simple regular expression and does not verify
    whether an email actually exists.

    Parameters
    ----------
    prompt : str, optional
        Use an alternative prompt.
    empty : bool, optional
        Allow an empty response.
    mode : {'simple'}, optional
        'simple' will use a simple regular expression.
        No other mode is implemented yet.

    Returns
    -------
    str or None
        A str if the user entered a likely email address.
        None if the user pressed only Enter and ``empty`` was True.