recipe-576523.py 文件源码

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

项目:code 作者: ActiveState 项目源码 文件源码
def read_snapshots(filename):
        """Sequentially reads the sets of signatures from a file. For
        each set of signatures, a GCSnapshot is created with the
        stored name. return the dict set name -> GCSnapshot object"""
    result = dict()
    f = open(filename, 'r')
    while 1:
        try:
            snap = GCSnapshot(f)
            result[snap.name] = snap
        except (EOFError, pickle.UnpicklingError):
            break
    f.close()
    return result


#### BEGIN: ONLY FOR THE TESTS
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号