def __bool__(self) -> bool:
return bool(self.parent_listeners)
- __nonzero__ = __bool__
-
class _MutexProtocol(Protocol):
def __enter__(self) -> bool:
def __bool__(self) -> bool:
return bool(self.listeners or self.parent_listeners)
- __nonzero__ = __bool__
-
class _ListenerCollection(_CompoundListener[_ET]):
"""Instance-level attributes on instances of :class:`._Dispatch`.
def __bool__(self) -> bool:
return bool(self.col)
- __nonzero__ = __bool__
-
def __getstate__(self) -> Any:
return {"parent": self.parent, "lazy_collection": self.lazy_collection}
else:
return False
- __nonzero__ = __bool__
-
def __contains__(self, __o: object) -> bool:
for member in self.col:
if self._get(member) == __o:
def __bool__(self):
return True
- __nonzero__ = __bool__
-
def fire_append_wo_mutation_event(self, item, initiator=None):
"""Notify that a entity is entering the collection but is already
present.
def __bool__(self):
return True
- __nonzero__ = __bool__
-
class AppenderMixin:
query_class = None
def __bool__(self):
raise TypeError("Boolean value of this clause is not defined")
- __nonzero__ = __bool__
-
def __repr__(self):
friendly = self.description
if friendly is None:
to_evaluate = object.__getattribute__(self, "_to_evaluate")
return bool(to_evaluate)
- def __nonzero__(self):
- to_evaluate = object.__getattribute__(self, "_to_evaluate")
- return bool(to_evaluate)
-
def __getattribute__(self, key):
if key.startswith("_sa_"):
return object.__getattribute__(self, key[4:])