mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 14:34:47 -04:00
add __bool__ alias to __nonzero__ methods
Signed-off-by: Adrian Tschira <nota@notafile.com>
This commit is contained in:
parent
154b44c249
commit
f63ff73c7f
3 changed files with 9 additions and 0 deletions
|
@ -144,6 +144,7 @@ class _NotifierUserStream(object):
|
|||
class EventStreamResult(namedtuple("EventStreamResult", ("events", "tokens"))):
|
||||
def __nonzero__(self):
|
||||
return bool(self.events)
|
||||
__bool__ = __nonzero__ # python3
|
||||
|
||||
|
||||
class Notifier(object):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue