def _selection_cells_updated ( self, event ):
        """ Handles multiple cell selection changes.
        """
        gfi  = self.model.get_filtered_item
        rio  = self.model.raw_index_of
        cols = self.columns
        tl   = self.grid._grid.GetSelectionBlockTopLeft()
        br   = iter( self.grid._grid.GetSelectionBlockBottomRight() )

        # Get the column items and indices in the selection:
        values = []
        for row0, col0 in tl:
            row1, col1 = br.next()
            for row in xrange( row0, row1 + 1 ):
                item = gfi( row )
                for col in xrange( col0, col1 + 1 ):
                    values.append( ( ( rio( row ), col ),
                                     ( item, cols[ col ].name ) ) )

        # Sort by increasing row, column index:
        values.sort(key=itemgetter(0))

        # Save the new selection information:
        self.setx( selected_cell_indices = [ v[0] for v in values ])
        cells = [ v[1] for v in values ]
        self.setx( selected_cells = cells )

        # Update the toolbar status:
        self._update_toolbar( 0 > len( cells ) )

        # Invoke the user 'on_select' handler:
        self.ui.evaluate( self.factory.on_select, cells )
dataset/ETHPy150Open enthought/traitsui/traitsui/wx/table_editor.py/TableEditor._selection_cells_updated/swapped operands of `>`