mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
text has bool
This commit is contained in:
parent
e97a332fd3
commit
eb8a430a5b
1 changed files with 3 additions and 0 deletions
|
|
@ -35,6 +35,9 @@ class StringObj:
|
|||
def __len__(self):
|
||||
return self.length()
|
||||
|
||||
def __bool__(self):
|
||||
return bool(self._text)
|
||||
|
||||
def length(self):
|
||||
return len(self._text)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue