Add __repr__ methods to most objects`

These are closer to what __str__ should be and will likely change in the
future.
This commit is contained in:
Jan Petykiewicz 2020-05-11 20:31:07 -07:00
commit c236fdb81b
10 changed files with 64 additions and 0 deletions

View file

@ -876,3 +876,7 @@ class Pattern:
toplevel = list(patterns - not_toplevel)
return toplevel
def __repr__(self) -> str:
locked = ' L' if self.locked else ''
return (f'<Pattern "{self.name}": sh{len(self.shapes)} sp{len(self.subpatterns)} la{len(self.labels)}{locked}>')