def resizeColumnsToContents(self):
        """ Reimplemented to support proportional column width specifications.
            For information about the layout algorithm, see
            https://svn.enthought.com/enthought/wiki/Traits_3_0_tabular_editor.
        """
        editor = self._editor
        if editor.factory.auto_resize:
            # Use the default implementation.
            return super(_TableView, self).resizeColumnsToContents()
        available_space = self.viewport().width()
        hheader = self.horizontalHeader()

        # Assign sizes for columns with absolute size requests
        percent_vals, percent_cols = [], []
        for column in xrange(len(editor.adapter.columns)):
            width = editor.adapter.get_width(editor.object, editor.name, column)
            if width > 1:
                available_space -= width
                hheader.resizeSection(column, width)
            else:
                if width <= 0:
                    width = 0.1
                percent_vals.append(width)
                percent_cols.append(column)

        # Now use the remaining space for columns with proportional or no width
        # requests.
        percent_total = sum(percent_vals)
        for i, column in enumerate(percent_cols):
            percent = percent_total / percent_vals[i]
            width = max(30, int(percent * available_space))
            hheader.resizeSection(column, width)
dataset/ETHPy150Open enthought/traitsui/traitsui/qt4/tabular_editor.py/_TableView.resizeColumnsToContents/swapped operands of `/`