New submission from Jean-Paul Calderone <exar...@twistedmatrix.com>:
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 ---------- components: Library (Lib) messages: 110473 nosy: exarkun priority: normal severity: normal status: open title: pickle should support methods type: feature request _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9276> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com