def cmd_arg(self, *args, **kwargs):

        # TODO: perhaps add a 'group' argument to cmd_arg() that
        # translates to add_argument_group

        if len(args) == 1 and callable(args[0]) and not kwargs:
            raise TypeError("cmd_arg() decorator requires arguments, "
                            "but none were supplied")

        # Remember the passed args, since the command is not yet known
        # when this decorator is called.
        self._pending_args.append((args, kwargs))

        # Return a do-nothing decorator
        return lambda func: func
Decorator to specify a command line argument for a subcommand.
dataset/ETHPy150Open splunk/splunk-webframework/contrib/aaargh/aaargh.py/App.cmd_arg