cli.py 文件源码

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

项目:ga4gh-common 作者: ga4gh 项目源码 文件源码
def _iter_indented_subactions(self, action):
        """
        Sort the subcommands alphabetically
        """
        try:
            get_subactions = action._get_subactions
        except AttributeError:
            pass
        else:
            self._indent()
            if isinstance(action, argparse._SubParsersAction):
                for subaction in sorted(
                        get_subactions(), key=lambda x: x.dest):
                    yield subaction
            else:
                for subaction in get_subactions():
                    yield subaction
            self._dedent()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号