Return copy of current element. This creates a shallow copy. Subelements will be shared with the original tree.
(self)
| 190 | return self.__class__(tag, attrib) |
| 191 | |
| 192 | def copy(self): |
| 193 | """Return copy of current element. |
| 194 | |
| 195 | This creates a shallow copy. Subelements will be shared with the |
| 196 | original tree. |
| 197 | |
| 198 | """ |
| 199 | warnings.warn( |
| 200 | "elem.copy() is deprecated. Use copy.copy(elem) instead.", |
| 201 | DeprecationWarning |
| 202 | ) |
| 203 | return self.__copy__() |
| 204 | |
| 205 | def __copy__(self): |
| 206 | elem = self.makeelement(self.tag, self.attrib) |
no test coverage detected