Skip to content

Commit 8b7ff8e

Browse files
committed
Update the docstring for _clone_node(...)
1 parent 3f71f1f commit 8b7ff8e

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Lib/xml/dom/minidom.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1922,10 +1922,16 @@ def renameNode(self, n, namespaceURI, name):
19221922

19231923

19241924
def _clone_node(node, deep, newOwnerDocument):
1925-
"""
1926-
Returns a copy of node.
1927-
If deep is true, the copy also includes the node’s descendants.
1928-
Called by Node.cloneNode and Document.importNode
1925+
"""Create and return a clone of a DOM node.
1926+
1927+
Args:
1928+
node: The DOM node to clone
1929+
deep (bool): If True, recursively clone the node's descendants.
1930+
If False, only clone the node itself.
1931+
newOwnerDocument: The document that will own the cloned node
1932+
1933+
Returns:
1934+
The cloned node
19291935
"""
19301936
if node.ownerDocument.isSameNode(newOwnerDocument):
19311937
operation = xml.dom.UserDataHandler.NODE_CLONED

0 commit comments

Comments
 (0)