Skip to content

Commit

Permalink
Define initial XML.__copy__()
Browse files Browse the repository at this point in the history
  • Loading branch information
purplezimmermann committed May 16, 2019
1 parent 6d68ca8 commit 1b2b2e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions morexml/xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@ def __init__(self, xmltext=None):
raise NotImplementedError(
"Instantiating morexml.XML from XML text is not implemented yet")

def __copy__(self):
# TODO: include subtree
return XML[self.tag](attrs=self.element.attrib, xmlns=self.xmlns())

@property
def parent(self):
"""
Expand Down

0 comments on commit 1b2b2e3

Please sign in to comment.