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 alexandre.vassalotti, belopolsky, hinsen, loewis, obamausa8, pitrou, rhettinger
Date 2010-07-16.19:26:50
SpamBayes Score 1.097218e-05
Marked as misclassified No
Message-id <1279308413.11.0.0502239733742.issue558238@psf.upfronthosting.co.za>
In-reply-to
Content
See also issue3657. For some reasons, C bound methods aliased as module globals can be pickled, but not similarly aliased Python bound methods:

>>> random.random, random.seed
(<built-in method random of Random object at 0x27abe20>, <bound method Random.seed of <random.Random object at 0x27abe20>>)
>>> pickle.dumps(random.random)
b'\x80\x03crandom\nrandom\nq\x00.'
>>> pickle.dumps(random.seed)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/antoine/py3k/__svn__/Lib/pickle.py", line 1314, in dumps
    Pickler(f, protocol, fix_imports=fix_imports).dump(obj)
_pickle.PicklingError: Can't pickle <class 'method'>: attribute lookup builtins.method failed
History
Date User Action Args
2010-07-16 19:26:53pitrousetrecipients: + pitrou, loewis, rhettinger, hinsen, belopolsky, alexandre.vassalotti, obamausa8
2010-07-16 19:26:53pitrousetmessageid: <1279308413.11.0.0502239733742.issue558238@psf.upfronthosting.co.za>
2010-07-16 19:26:51pitroulinkissue558238 messages
2010-07-16 19:26:50pitroucreate