Skip to content

Commit

Permalink
add Node.copy()
Browse files Browse the repository at this point in the history
  • Loading branch information
malb committed Aug 20, 2018
1 parent 4f568a2 commit 6e191ce
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/fpylll/tools/bkz_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,17 @@ def __sub__(self, rhs):
print("Skipping missing node '%s'"%lchild.label)
return diff

def copy(self, deepcopy=True):
"""
Return a (deep)copy of this node.
:param deepcopy: If ``False`` child nodes and data dictionaries are not copied, this is
usually not what the user wants.
"""
if deepcopy:
return copy.deepcopy(self)
else:
return copy.copy(self)

class TimeTreeTracer(Tracer):
"""
Expand Down

0 comments on commit 6e191ce

Please sign in to comment.