argparse.py 文件源码

python
阅读 39 收藏 0 点赞 0 评论 0

项目:zabbix_manager 作者: BillWang139967 项目源码 文件源码
def _add_action(self, action):
        # resolve any conflicts
        self._check_conflict(action)

        # add to actions list
        self._actions.append(action)
        action.container = self

        # index the action by any option strings it has
        for option_string in action.option_strings:
            self._option_string_actions[option_string] = action

        # set the flag if any option strings look like negative numbers
        for option_string in action.option_strings:
            if self._negative_number_matcher.match(option_string):
                if not self._has_negative_number_optionals:
                    self._has_negative_number_optionals.append(True)

        # return the created action
        return action
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号