@staticmethod
    def __format(f, args, ext):
        """
            Append the format extension to the last argument

            @param f: the function
            @param args: argument list
            @param ext: the format extension

            @return: tuple (f, args)
        """

        if not ext or ext == "html":
            return f, args
        items = [f]
        if args:
            items += args
        items = [i.rsplit(".", 1)[0] for i in items]
        items.append("%s.%s" % (items.pop(), ext))
        return (items[0], items[1:])

    # -------------------------------------------------------------------------
dataset/ETHPy150Open sahana/eden/modules/s3/s3navigation.py/S3NavigationItem.__format/original