def METHOD_NAME(self, **kwargs):
    if "module" in kwargs:
        raise AttributeError("module is an illegal attribute")
    if "output" in kwargs:
        dir, tab = os.path.split(output)
        if not tab.endswith(".py"):
            raise AttributeError("The output file must end with .py")
        kwargs["outputdir"] = dir
        kwargs["tabmodule"] = tab[:-3]
    self.yacc_kwargs = kwargs