bpo-32424: Rename copy() to copy() in Python version of xml.etree.ElementTree. by GPHemsley · Pull Request #5022 · python/cpython (original) (raw)

The C version defines __copy__() and __deepcopy__() while the Python
version defines copy(). The documentation does not mention copy(), so
it is presumed to be in error. This unifies the definition of __copy__()
between the Python and C version, making the proper way to copy an
Element be copy.copy(ET.Element("foo")).

https://bugs.python.org/issue32424