pickle文件序列化
时间:2007-10-24 来源:jcodeer
# -*- coding: cp936 -*- |
2.将序列化的数据读入
# -*- coding: cp936 -*- |
与list相同的还有:
- integers, long integers, floating point numbers, complex numbers
- normal and Unicode strings
- tuples, lists, sets, and dictionaries containing only picklable objects
- functions defined at the top level of a module
- built-in functions defined at the top level of a module
- classes that are defined at the top level of a module
- instances of such classes whose __dict__ or __setstate__() is picklable
3.将函数序列化
# -*- coding: cp936 -*- |
4.将函数从文件中读取出来
# -*- coding: cp936 -*- |
与函数相同的还有如下: