[New-bugs-announce] [issue32424] Rename copy() to __copy__() in xml.etree.ElementTree.Element Python implementation
Gordon P. Hemsley
report at bugs.python.org
Sun Dec 24 13:51:40 EST 2017
New submission from Gordon P. Hemsley <gphemsley at gphemsley.org>:
Currently, the Python implementation of the Element class in xml.etree.ElementTree defines a method called copy() which the C implementation does not define, whereas the C implementation defines a __copy__() method (and a __deepcopy__() method) which the Python implementation does not define.
Given that the documentation makes no mention of a copy() method and that its definition would be masked by a standard import of xml.etree.ElementTree, I propose that it be renamed to __copy__() so that copy.copy() can make use of it.
components: Library (Lib), XML
nosy: eli.bendersky, gphemsley, scoder
title: Rename copy() to __copy__() in xml.etree.ElementTree.Element Python implementation
versions: Python 3.7
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce