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 pitrou
Recipients ChrisCooper, docs@python, dstufft, ezio.melotti, ncoghlan, pitrou, terry.reedy, westley.martinez
Date 2013-12-04.19:16:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1386184620.19.0.893102247761.issue18840@psf.upfronthosting.co.za>
In-reply-to
Content
Correction: you can't pickle executable code, you can pickle references to well-known objects (by name):

>>> def f(): pass
... 
>>> pickle.dumps(f)
b'\x80\x03c__main__\nf\nq\x00.'
>>> pickle.dumps(f.__code__)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
_pickle.PicklingError: Can't pickle <class 'code'>: attribute lookup code on builtins failed
History
Date User Action Args
2013-12-04 19:17:00pitrousetrecipients: + pitrou, terry.reedy, ncoghlan, ezio.melotti, docs@python, westley.martinez, ChrisCooper, dstufft
2013-12-04 19:17:00pitrousetmessageid: <1386184620.19.0.893102247761.issue18840@psf.upfronthosting.co.za>
2013-12-04 19:17:00pitroulinkissue18840 messages
2013-12-04 19:16:59pitroucreate