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

@ -170,3 +170,7 @@ class Label:
object.__setattr__(self, 'locked', False)
self.offset.flags.writeable = True
return self
def __repr__(self) -> str:
locked = ' L' if self.locked else ''
return f'<Label "{self.string}" l{self.layer} o{self.offset}{locked}>'