Message110473
pickle doesn't support methods:
>>> class x:
... def y(self):
... pass
...
>>> import pickle
>>> pickle.dumps(x.y)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/exarkun/Projects/python/branches/py3k/Lib/pickle.py", line 1314, in dumps
Pickler(f, protocol, fix_imports=fix_imports).dump(obj)
_pickle.PicklingError: Can't pickle <class 'function'>: attribute lookup builtins.function failed
It would be easy to fix this, though. Here's a link to some code that implements it: http://twistedmatrix.com/trac/browser/trunk/twisted/persisted/styles.py?rev=1 |
|
Date |
User |
Action |
Args |
2010-07-16 19:25:20 | exarkun | set | recipients:
+ exarkun |
2010-07-16 19:25:20 | exarkun | set | messageid: <1279308320.41.0.159043379114.issue9276@psf.upfronthosting.co.za> |
2010-07-16 19:25:18 | exarkun | link | issue9276 messages |
2010-07-16 19:25:18 | exarkun | create | |
|