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
|
|
@ -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}>'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue