mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-01 05:04:51 +00:00
Implement __bool__
This commit is contained in:
parent
2da47d7b6b
commit
88292cf7d6
1 changed files with 3 additions and 0 deletions
|
|
@ -37,6 +37,9 @@ class Object:
|
|||
def __str__(self) -> str:
|
||||
return dumps(self, cls=Encoder, indent=4)
|
||||
|
||||
def __bool__(self) -> bool:
|
||||
return True
|
||||
|
||||
def __eq__(self, other) -> bool:
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue