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:
parent
c79eee2a8c
commit
c236fdb81b
10 changed files with 64 additions and 0 deletions
|
|
@ -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}>')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue