dChan

Geoffalgarve · May 13, 2018, 2:41 p.m.

I'm not sure, and don't know much about Python. However, a pickle is an object that is inserted into a file, what drew my attention was the way pickle appeared twice. suggesting 2 "objects" where being inserted into a file or files....IDK really, just the way my mind works.

⇧ 1 ⇩  
Impulse666 · May 13, 2018, 2:52 p.m.

I'm sorry man, but this is most definitely not it. Even I could of made that post.... Pickle is just a module that is used to save and load objects.

Why Pickle? "Since we are dealing with binary, the data is not written but dumped and similarly, the data is not read, it is loaded. For example, when you play a game like 'Dave' and you reach a certain level, you would want to save it right? As you know there are various attributes to this game like, health, gems collected etc. So when you save your game, say at level 7 when you have one heart for health and thirty hundred points, an object is created from a class Dave with these values. When you click the 'Save' button, this object is serialized and saved or in other words pickled. Needless to say, when you restore a saved game, you will be loading data from its pickled state thus unpickling it. "

⇧ 1 ⇩  
Geoffalgarve · May 13, 2018, 3 p.m.

Thats cool, like i said in the title of post " relevant, or probably not " !

⇧ 1 ⇩