Create a new element with the same type. *tag* is a string containing the element name. *attrib* is a dictionary containing the element attributes. Do not call this method, use the SubElement factory function instead.
(self, tag, attrib)
| 176 | return "<%s %r at %#x>" % (self.__class__.__name__, self.tag, id(self)) |
| 177 | |
| 178 | def makeelement(self, tag, attrib): |
| 179 | """Create a new element with the same type. |
| 180 | |
| 181 | *tag* is a string containing the element name. |
| 182 | *attrib* is a dictionary containing the element attributes. |
| 183 | |
| 184 | Do not call this method, use the SubElement factory function instead. |
| 185 | |
| 186 | """ |
| 187 | return self.__class__(tag, attrib) |
| 188 | |
| 189 | def __copy__(self): |
| 190 | elem = self.makeelement(self.tag, self.attrib) |