def __init__(self, function, scope, message=None):
        """Contruct an OAuthScopeRequiredClientException.

        :param function: The function that requires a scope.
        :param scope: The scope required for the function.
        :param message: A custom message to associate with the
            exception. Default: `function` requires the OAuth2 scope `scope`

        """
        if not message:
            message = '`{0}` requires the OAuth2 scope `{1}`'.format(function,
                                                                     scope)
        super(OAuthScopeRequired, self).__init__(message)
        self.scope = scope
Contruct an OAuthScopeRequiredClientException.

        :param function: The function that requires a scope.
        :param scope: The scope required for the function.
        :param message: A custom message to associate with the
            exception. Default: `function` requires the OAuth2 scope `scope`

        
rtv/packages/praw/errors.py