From aea763021c248e224bd6fb4e965da0ca9362a2ac Mon Sep 17 00:00:00 2001 From: Salvo 'LtWorf' Tomaselli Date: Tue, 18 Aug 2020 16:08:14 +0200 Subject: [PATCH] Remove useless new object --- relational/relation.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/relational/relation.py b/relational/relation.py index abe2173..be6c1a0 100644 --- a/relational/relation.py +++ b/relational/relation.py @@ -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': '''