def _validate_field_names(self, val):
        # Check for appropriate length
        if self._field_names:
            try:
                assert len(val) == len(self._field_names)
            except AssertionError:
                raise Exception("Field name list has incorrect number of values, (actual) %d!=%d (expected)" % (
                len(val), len(self._field_names)))
        if self._rows:
            try:
                assert len(val) == len(self._rows[0])
            except __HOLE__:
                raise Exception("Field name list has incorrect number of values, (actual) %d!=%d (expected)" % (
                len(val), len(self._rows[0])))
        # Check for uniqueness
        try:
            assert len(val) == len(set(val))
        except AssertionError:
            raise Exception("Field names must be unique!")
dataset/ETHPy150Open kxxoling/PTable/prettytable/prettytable.py/PrettyTable._validate_field_names