import sys def f_quit(self, origin, match, args): sys.exit() f_quit.rule = (['quit'], None)