def slash_url_suffix(url, suffix):
    """Adds a slash either to the beginning or the end of a suffix
    (which is to be appended to a URL), depending on whether or not
    the URL ends with a slash."""

    return url.endswith('/') and ('%s/' % suffix) or (suffix % '/%s')
dataset/ETHPy150Open mattupstate/flask-security/flask_security/utils.py/slash_url_suffix/swapped operands of `%`