summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/associationproxy.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/ext/associationproxy.py')
-rw-r--r--lib/sqlalchemy/ext/associationproxy.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/sqlalchemy/ext/associationproxy.py b/lib/sqlalchemy/ext/associationproxy.py
index d86297bc1..d6a995450 100644
--- a/lib/sqlalchemy/ext/associationproxy.py
+++ b/lib/sqlalchemy/ext/associationproxy.py
@@ -243,7 +243,10 @@ class _AssociationList(object):
return len(self.col)
def __nonzero__(self):
- return True if self.col else False
+ if self.col:
+ return True
+ else:
+ return False
def __getitem__(self, index):
return self._get(self.col[index])
@@ -355,7 +358,10 @@ class _AssociationDict(object):
return len(self.col)
def __nonzero__(self):
- return True if self.col else False
+ if self.col:
+ return True
+ else:
+ return False
def __getitem__(self, key):
return self._get(self.col[key])
@@ -497,7 +503,10 @@ class _AssociationSet(object):
return len(self.col)
def __nonzero__(self):
- return True if self.col else False
+ if self.col:
+ return True
+ else:
+ return False
def __contains__(self, value):
for member in self.col: