pickle 之前隐隐约约在哪里看到过pickle这个模块但一直没怎么用过.然后让我下定决心学习一下这个模块的原因竟然是[妹抖龙女(男)主在工作中用到了pickle哈哈哈].嗯嗯,不扯皮了.pickle的作用是把Python的对象序列化为适合储存到文件.可通过网络传输.存放于数据库中的字节流方式.相当于把原先只存在于内存中的python对象给固化到硬盘上来.这个和之前用到过的shelve有点像,不过shelve只支持字典一个格式,而pickle应该是百通的. 关于对象序列化(or you wil…
python 对象/变量 对象 Every object has an identity, a type and a value. An object's identity never changes once it has been created; you may think of it as the object's address in memory. The 'is' operator compares the identity of two objects; the id() fun…