Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以对已打开的文件使用搁置?我想做类似下面的事情,但是 shelve.open 不接受文件描述符。
f = open('file.shelve') s = shelve.open(f)
shelve 基于dbm,不提供 fd 接口。不幸的是,dbm 不太可能提供一个,因为它依赖于rename数据库一致性的原子性。
rename