Remove useless new object

master
Salvo 'LtWorf' Tomaselli 2020-08-18 16:08:14 +07:00
parent c246c0715d
commit aea763021c
No known key found for this signature in database
GPG Key ID: B3A7CF0C801886CF
1 changed files with 1 additions and 3 deletions

@ -129,8 +129,6 @@ class Relation(NamedTuple):
'''
Selection, expr must be a valid Python expression; can contain field names.
'''
header = Header(self.header)
try:
c_expr = compile(expr, 'selection', 'eval')
except:
@ -148,7 +146,7 @@ class Relation(NamedTuple):
content.append(i)
except Exception as e:
raise Exception(f'Failed to evaluate {expr}\n{e}')
return Relation(header, frozenset(content))
return Relation(self.header, frozenset(content))
def product(self, other: 'Relation') -> 'Relation':
'''