Common use-cases for pickle in Python

后端 未结 9 1591
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-02 04:56

I\'ve looked at the pickle documentation, but I don\'t understand where pickle is useful.

What are some common use-cases for pickle?

9条回答
  •  清歌不尽
    2020-12-02 05:19

    I have used it in one of my projects. If the app was terminated during it's working (it did a lengthy task and processed lots of data), I needed to save the whole data structure and reload it after the app was run again. I used cPickle for this, as speed was a crucial thing and the size of data was really big.

提交回复
热议问题