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 zach.ware
Recipients Antony.Lee, pitrou, serhiy.storchaka, zach.ware
Date 2014-11-28.21:33:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1417210431.23.0.867525129825.issue22955@psf.upfronthosting.co.za>
In-reply-to
Content
Note that pickling of the pure Python version of methodcaller works as expected:

Python 3.4.2 (default, Nov 20 2014, 12:40:10) 
[GCC 4.8.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.modules['_operator'] = None
>>> import operator
>>> import pickle
>>> pickle.loads(pickle.dumps(operator.methodcaller('foo')))
<operator.methodcaller object at 0x7ff869945898>

The pure Python attrgetter and itemgetter don't work due to using functions defined in __init__().

2.7 already raises TypeError on attempts to pickle any of the three.
History
Date User Action Args
2014-11-28 21:33:51zach.waresetrecipients: + zach.ware, pitrou, serhiy.storchaka, Antony.Lee
2014-11-28 21:33:51zach.waresetmessageid: <1417210431.23.0.867525129825.issue22955@psf.upfronthosting.co.za>
2014-11-28 21:33:51zach.warelinkissue22955 messages
2014-11-28 21:33:51zach.warecreate