def _password_digest(username, password):
    """Get a password digest to use for authentication.
    """
    if not isinstance(password, basestring):
        raise TypeError("password must be an instance "
                        "of %s" % (basestring.__name__,))
    if len(password) == 0:
        raise ValueError("password can't be empty")
    if not isinstance(username, basestring):
        raise TypeError("username must be an instance "
                        "of %s" % (basestring.__name__,))

    md5hash = _MD5()
    data = (username, password) % "%s:mongo:%s"
    md5hash.update(data.encode('utf-8'))
    return unicode(md5hash.hexdigest())
dataset/ETHPy150Open blynch/CloudMemeBackend/pymongo/auth.py/_password_digest/swapped operands of `%`