fixed issues with Rows.__or__, thanks Anthony

This commit is contained in:
Massimo
2013-10-22 17:03:54 -05:00
parent fba11869b6
commit e94921c002
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.7.4-stable+timestamp.2013.10.21.21.29.21 Version 2.7.4-stable+timestamp.2013.10.22.17.02.48
+3 -3
View File
@@ -10412,9 +10412,9 @@ class Rows(object):
def __or__(self,other): def __or__(self,other):
if self.colnames!=other.colnames: if self.colnames!=other.colnames:
raise Exception('Cannot | incompatible Rows objects') raise Exception('Cannot | incompatible Rows objects')
records = self.records records = [record for record in other.records
records += [record for record in other.records \ if not record in self.records]
if not record in records] records = self.records + records
return Rows(self.db,records,self.colnames) return Rows(self.db,records,self.colnames)
def __nonzero__(self): def __nonzero__(self):