Skip to content

Commit

Permalink
Update Relation's __str__ and __repr__ implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonwillard committed Jul 28, 2022
1 parent 7f9accb commit 9f19cd4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kanren/facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ def goal(substitution):
return goal

def __str__(self):
return "Rel: " + self.name
return f"Rel: {self.name}"

__repr__ = __str__
def __repr__(self):
return f"{type(self).__name__}({self.name}, {self.index}, {self.facts})"


def fact(rel, *args):
Expand Down

0 comments on commit 9f19cd4

Please sign in to comment.