text has bool

This commit is contained in:
iLLiCiTiT 2021-08-13 15:45:43 +02:00
parent e97a332fd3
commit eb8a430a5b

View file

@ -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)