Commit ed399785 authored by Eddie Schoute's avatar Eddie Schoute
Browse files

Add repr to Reversal for pretty print

parent 0e835b88
......@@ -35,9 +35,12 @@ class Reversal:
def __lt__(self, other):
return self.beg < other.beg
def __str__(self):
def __repr__(self):
return "(" + str(self.beg) + ", " + str(self.end) + ")"
def __str__(self):
return repr(self)
# Perform the given reversal on the given permutation
def reverse(permutation, reversal):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment