configuration.py 文件源码

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

项目:pip-update-requirements 作者: alanhamlett 项目源码 文件源码
def _construct_parser(self, fname):
        # type: (str) -> RawConfigParser
        parser = configparser.RawConfigParser()
        # If there is no such file, don't bother reading it but create the
        # parser anyway, to hold the data.
        # Doing this is useful when modifying and saving files, where we don't
        # need to construct a parser.
        if os.path.exists(fname):
            parser.read(fname)

        return parser
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号