def route(self, rule, name=None, methods=('GET','HEAD'), auto404=False,
              headers=None, content_type=None, func=None):
        """
        The route decorator is used to register a new route with the Module
        instance. Example::

            @app.route("/")
            def hello_world(request):
                return "Hiya, Everyone!"

        .. seealso::

            See :ref:`app-routing` for more information on writing rules.

        =============  ============
        Argument       Description
        =============  ============
        rule           The route rule to be matched for the decorated function to be used for handling a request.
        name           *Optional.* The name of the decorated function, for use with the :func:`url_for` helper function.
        methods        *Optional.* A list of HTTP methods to allow for this request handler. By default, only ``GET`` and ``HEAD`` requests are allowed, and all others will result in a ``405 Method Not Allowed`` error.
        auto404        *Optional.* If this is set to True, all response handler arguments will be checked for truthiness (True, non-empty strings, etc.) and, if any fail, a ``404 Not Found`` page will be rendered automatically.
        headers        *Optional.* A dictionary of HTTP headers to always send with the response from this request handler. Any headers set within the request handler will override these headers.
        content_type   *Optional.* The HTTP Content-Type header to send with the response from this request handler. A Content-Type header set within the request handler will override this.
        func           *Optional.* The function for this view. Specifying the function bypasses the usual decorator-like behavior of this function.
        =============  ============
        """
        if not '/' in rule:
            rule = '/' + rule

        def decorator(func):
            if not callable(func):
                raise ValueError("Request handler must be callable.")

            if name is None:
                if hasattr(func, "__name__"):
                    _name = func.__name__
                elif hasattr(func, "__class__"):
                    _name = func.__class__.__name__
                else:
                    raise ValueError("Cannot find name for rule. Please "
                                     "specify name manually.")
            else:
                _name = name

            # Get the rule table for this rule.
            rule_table = self._routes.setdefault(rule, {})
            if isinstance(rule_table, Module):
                raise ValueError(rule % "The rule %r is claimed by a Module.")

            # Now, for each method, store the data.
            for method in methods:
                rule_table[method] = (func, _name, True, auto404, headers, content_type)

            # Recalculate and return.
            self._recalculate_routes()
            return func

        if func:
            return decorator(func)
        return decorator


###############################################################################
# Application Class
###############################################################################
dataset/ETHPy150Open ecdavis/pants/pants/web/application.py/Module.route/swapped operands of `%`