SE/relacion.py
def selection(self, expr):
        '''
        Selection, expr must be a valid Python expression; can contain field names.
        '''
        newt = relation()
        newt.header = Header(self.header)

        c_expr = compile(expr, 'selection', 'eval')

        for i in self.content:
            # Fills the attributes dictionary with the values of the tuple
            attributes = {attr: i[j].autocast()
                          for j, attr in enumerate(self.header)
                          }

            try:
                if eval(c_expr, attributes):
                    newt.content.add(i)
            except Exception as e:
                raise Exception(
                    "Failed to evaluate %s\n%s" % (expr, e.__str__()))
        return newt

        Selection, expr must be a valid Python expression; can contain field names.
        
Selection, expr must be a valid Python expression; can contain field names.
Selection expr must be a valid Python expression ; can contain field names .
def selection(self, expr):
        newt = relation()
        newt.header = Header(self.header)
        c_expr = compile(expr, 'selection', 'eval')
        for i in self.content:
            attributes = {attr: i[j].autocast()
                          for j, attr in enumerate(self.header)
                          }
            try:
                if eval(c_expr, attributes):
                    newt.content.add(i)
            except Exception as e:
                raise Exception(
                    "Failed to evaluate %s\n%s" % (expr, e.__str__()))
        return newt
def selection ( self , expr ) : newt = relation ( ) newt . header = Header ( self . header ) c_expr = compile ( expr , 'selection' , 'eval' ) for i in self . content : attributes = { attr : i [ j ] . autocast ( ) for j , attr in enumerate ( self . header ) } try : if eval ( c_expr , attributes ) : newt . content . add ( i ) except Exception as e : raise Exception ( "Failed to evaluate %s\n%s" % ( expr , e . __str__ ( ) ) ) return newt
Selection, expr must be a valid Python expression; can contain field names.
Selection expr must be a valid Python expression ; can contain field names .
'''
        Selection, expr must be a valid Python expression; can contain field names.
        ''' # Fills the attributes dictionary with the values of the tuple
self
expr