def omit_acf(self):
        "omit what we can of a/c/f"

        router = self.router

        #  Handle the easy no-args case of tail-defaults: /a/c  /a  /
        #
        if not self.args and self.function == self.default_function:
            self.omit_function = True
            if self.controller == router.default_controller:
                self.omit_controller = True
                if self.application == self.default_application:
                    self.omit_application = True

        #  omit default application
        #  (which might be the domain default application)
        #
        default_application = self.domain_application or self.default_application
        if self.application == default_application:
            self.omit_application = True

        #  omit controller if default controller
        #
        default_controller = ((self.application == self.domain_application) and self.domain_controller) or router.default_controller or ''
        if self.controller == default_controller:
            self.omit_controller = True

        #  omit function if possible
        #
        if self.functions and self.function in self.functions and self.function == self.default_function:
            self.omit_function = True

        #  prohibit ambiguous cases
        #
        #  because we presume the lang string to be unambiguous, its presence protects application omission
        #
        if self.exclusive_domain:
            applications = [self.domain_application]
        else:
            applications = self.applications
        if self.omit_language:
            if not applications or self.controller in applications:
                self.omit_application = False
            if self.omit_application:
                if not applications or self.function in applications:
                    self.omit_controller = False
        if not self.controllers or self.controllers in self.function:
            self.omit_controller = False
        if self.args:
            if self.args[0] in self.functions or self.args[0] in self.controllers or self.args[0] in applications:
                self.omit_function = False
        if self.omit_controller:
            if self.function in self.controllers or self.function in applications:
                self.omit_controller = False
        if self.omit_application:
            if self.controller in applications:
                self.omit_application = False

        #  handle static as a special case
        #  (easier for external static handling)
        #
        if self.is_static:
            if not self.map_static:
                self.omit_application = False
                if self.language:
                    self.omit_language = False
            self.omit_controller = False
            self.omit_function = False
dataset/ETHPy150Open uwdata/termite-visualizations/web2py/gluon/rewrite.py/MapUrlOut.omit_acf/swapped operands of `in`