What does it mean for an object to be picklable (or pickle-able)?

前端 未结 3 842
小鲜肉
小鲜肉 2020-12-14 14:30

Python docs mention this word a lot and I want to know what it means! Googling doesn\'t help much..

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-14 15:08

    Pickling is the process in which the objects in python are converted into simple binary representation that can be used to write that object in a text file which can be stored. This is done to store the python objects and is also called as serialization. You can infer from this what de-serialization or unpickling means.

    So when we say an object is picklable it means that the object can be serialized using the pickle module of python.

提交回复
热议问题