Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/xml/etree/ElementTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def makeelement(self, tag, attrib):
"""
return self.__class__(tag, attrib)

def copy(self):
def __copy__(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this breaks the public API. I think we could do it in this way, keep the copy() method and alias it to __copy__.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you feel strongly about it, leave a comment on the bpo ticket. It may be worth having a discussion about what constitutes the "public" API in this case.

"""Return copy of current element.

This creates a shallow copy. Subelements will be shared with the
Expand Down