This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author exarkun
Recipients exarkun
Date 2010-07-16.19:25:18
SpamBayes Score 0.0010243203
Marked as misclassified No
Message-id <1279308320.41.0.159043379114.issue9276@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2010-07-16 19:25:20exarkunsetrecipients: + exarkun
2010-07-16 19:25:20exarkunsetmessageid: <1279308320.41.0.159043379114.issue9276@psf.upfronthosting.co.za>
2010-07-16 19:25:18exarkunlinkissue9276 messages
2010-07-16 19:25:18exarkuncreate