packages/vaex-core/vaex/dataframe.py
def _selection(self, create_selection, name, executor=None, execute_fully=False):
        """select_lasso and select almost share the same code"""
        selection_history = self.selection_histories[name]
        previous_index = self.selection_history_indices[name]
        current = selection_history[previous_index] if selection_history else None
        selection = create_selection(current)
        executor = executor or self.executor
        selection_history.append(selection)
        self.selection_history_indices[name] += 1
        # clip any redo history
        del selection_history[self.selection_history_indices[name]:-1]
        if 0:
            if self.is_local():
                if selection:
                    # result = selection.execute(executor=executor, execute_fully=execute_fully)
                    result = vaex.promise.Promise.fulfilled(None)
                    self.signal_selection_changed.emit(self)
                else:
                    result = vaex.promise.Promise.fulfilled(None)
                    self.signal_selection_changed.emit(self)
            else:
                self.signal_selection_changed.emit(self)
                result = vaex.promise.Promise.fulfilled(None)
        self.signal_selection_changed.emit(self)
        result = vaex.promise.Promise.fulfilled(None)
        logger.debug("select selection history is %r, index is %r", selection_history, self.selection_history_indices[name])
        return result
def _selection(self, create_selection, name, executor=None, execute_fully=False):
        selection_history = self.selection_histories[name]
        previous_index = self.selection_history_indices[name]
        current = selection_history[previous_index] if selection_history else None
        selection = create_selection(current)
        executor = executor or self.executor
        selection_history.append(selection)
        self.selection_history_indices[name] += 1
        # clip any redo history
        del selection_history[self.selection_history_indices[name]:-1]
        if 0:
            if self.is_local():
                if selection:
                    # result = selection.execute(executor=executor, execute_fully=execute_fully)
                    result = vaex.promise.Promise.fulfilled(None)
                    self.signal_selection_changed.emit(self)
                else:
                    result = vaex.promise.Promise.fulfilled(None)
                    self.signal_selection_changed.emit(self)
            else:
                self.signal_selection_changed.emit(self)
                result = vaex.promise.Promise.fulfilled(None)
        self.signal_selection_changed.emit(self)
        result = vaex.promise.Promise.fulfilled(None)
        logger.debug("select selection history is %r, index is %r", selection_history, self.selection_history_indices[name])
        return result
def _selection ( self , create_selection , name , executor = None , execute_fully = False ) : selection_history = self . selection_histories [ name ] previous_index = self . selection_history_indices [ name ] current = selection_history [ previous_index ] if selection_history else None selection = create_selection ( current ) executor = executor or self . executor selection_history . append ( selection ) self . selection_history_indices [ name ] += 1 # clip any redo history del selection_history [ self . selection_history_indices [ name ] : - 1 ] if 0 : if self . is_local ( ) : if selection : # result = selection.execute(executor=executor, execute_fully=execute_fully) result = vaex . promise . Promise . fulfilled ( None ) self . signal_selection_changed . emit ( self ) else : result = vaex . promise . Promise . fulfilled ( None ) self . signal_selection_changed . emit ( self ) else : self . signal_selection_changed . emit ( self ) result = vaex . promise . Promise . fulfilled ( None ) self . signal_selection_changed . emit ( self ) result = vaex . promise . Promise . fulfilled ( None ) logger . debug ( "select selection history is %r, index is %r" , selection_history , self . selection_history_indices [ name ] ) return result
select_lasso and select almost share the same code
select_lasso and select almost share the same code