@cmdln.option("-w", "--weapon", help="what weapon should Conan use?")
    def do_crush(self, subcmd, opts, *enemies):
        """${cmd_name}: crush your enemies!

        ${cmd_usage}
        ${cmd_option_list}
        C.f. Conan the Barbarian.
        """
        action = {
            None: "Crush",
            "sword": "Swipe",
            "spear": "Pierce",
            "maul": "Crush",
        }.get(opts.weapon, None)
        if not action:
            print("Conan confused.")
        else:
            for enemy in enemies:
                print("%s %s!" % (action, enemy))
            print("Yargh!")
dataset/ETHPy150Open trentm/cmdln/docs/conan.py/Conan.do_crush/original