def __init__(self, after=None, before=None, name=None):
        '''Register template directory.

        The decorated function gets no argument and should return a
        relative or absolute path to a directory containing templates
        that can be loaded by this app. If a relative path, it is made
        absolute from the directory this module is in.

        Template directories can be ordered: templates in a directory
        ``before`` another one are found before templates in a
        directory ``after`` it. But you can leave both ``before`` and
        ``after`` out: template directories defined in
        sub-applications automatically have a higher priority than
        those defined in base applications.

        :param after: Template directory function this template directory
          function to be under. The other template directory has a higher
          priority. You usually want to use ``over``. Optional.
        :param before: Template directory function function this function
          should have priority over. Optional.
        :param name: The name under which to register this template
          directory, so that it can be overridden by applications that
          extend this one.  If no name is supplied a default name is
          generated.

        '''
        global template_directory_id
        self._after = after
        self._before = before
        if name is None:
            name = template_directory_id % u'template_directory_%s'
            template_directory_id += 1
        self.name = name
dataset/ETHPy150Open morepath/morepath/morepath/directive.py/TemplateDirectoryAction.__init__/swapped operands of `%`