Jason Curtis added the comment:
This is still an issue with operator.attrgetter in 3.4.3, even after clearing
sys.modules['_operator']:
$ python3
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4] 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.attrgetter("foo")))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
_pickle.PicklingError: Can't pickle <function attrgetter.__init__.<locals>.func
at 0x7f25728d5bf8>: attribute lookup func on operator failed
----------
nosy: +Jason Curtis
versions: +Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue22955>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com