mirror of
https://git.launchpad.net/beautifulsoup
synced 2025-10-06 00:12:49 +02:00
Updated __copy__ docstrings.
This commit is contained in:
@@ -966,6 +966,9 @@ class NavigableString(str, PageElement):
|
||||
return type(self)(self)
|
||||
|
||||
def __copy__(self):
|
||||
"""A copy of a NavigableString can only be a deep copy, because
|
||||
only one PageElement can occupy a given place in a parse tree.
|
||||
"""
|
||||
return self.__deepcopy__({})
|
||||
|
||||
def __getnewargs__(self):
|
||||
@@ -1341,8 +1344,9 @@ class Tag(PageElement):
|
||||
return clone
|
||||
|
||||
def __copy__(self):
|
||||
# A copy of a Tag must always be a deep copy, because the
|
||||
# Tag's children can only have one parent at a time.
|
||||
"""A copy of a Tag must always be a deep copy, because a Tag's
|
||||
children can only have one parent at a time.
|
||||
"""
|
||||
return self.__deepcopy__({})
|
||||
|
||||
def _clone(self):
|
||||
|
Reference in New Issue
Block a user