Update doc strings

This commit is contained in:
Srinivas Reddy Thatiparthy 2025-01-06 18:08:01 +05:30
parent 2da171f4c5
commit ecb4a54d05

View file

@ -225,8 +225,9 @@ def normalize(self):
def cloneNode(self, deep):
"""Create and return a duplicate of this node.
deep: If True, recursively clone this node's descendants.
If False, clone only this node.
deep
If True, recursively clone this node's descendants.
If False, clone only this node.
"""
return _clone_node(self, deep, self.ownerDocument or self)
@ -1367,7 +1368,8 @@ def _get_internalSubset(self):
def cloneNode(self, deep):
"""Create and return a duplicate of this node.
deep: If True, recursively clone this node's descendants.
deep
If True, recursively clone this node's descendants.
If False, clone only this node.
"""
if self.ownerDocument is None:
@ -1934,10 +1936,13 @@ def renameNode(self, n, namespaceURI, name):
def _clone_node(node, deep, newOwnerDocument):
"""Create and return a clone of a DOM node.
node: The DOM node to clone
deep: If True, recursively clone the node's descendants.
node
The DOM node to clone
deep
If True, recursively clone the node's descendants.
If False, only clone the node itself.
newOwnerDocument: The document that will own the cloned node
newOwnerDocument
The document that will own the cloned node
"""
if node.ownerDocument.isSameNode(newOwnerDocument):
operation = xml.dom.UserDataHandler.NODE_CLONED