[issue16076] xml.etree.ElementTree.Element is no longer pickleable

Santoso Wijaya report at bugs.python.org
Thu Oct 11 19:07:17 CEST 2012


Santoso Wijaya added the comment:

OTOH, xml.etree.cElementTree.Element in Python 3.2 and earlier has never been pickleable, either.

Python 3.2.3+ (3.2:24499eebbc2f, Oct 10 2012, 13:54:45) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from xml.etree.cElementTree import Element
>>> repr(Element)
'<built-in function Element>'
>>> import pickle
>>> pickle.dumps(Element('foo'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
_pickle.PicklingError: Can't pickle <class 'Element'>: attribute lookup builtins.Element failed

----------
components: +Library (Lib)
versions: +Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16076>
_______________________________________


More information about the Python-bugs-list mailing list