def parse_homogeneous_list(self, parse_item, sep_tok_id, errmsg,
                               trailing_sep=False):
        """
        <item>_list : <item> <SEP> <item>_list
                    | <item>

        Returns a list of <item>s, or None.
        """
        saved_pos = self.pos
        # Parse zero or more "<item> <SEP>" repetitions
        items = []
        item = True
        while item is not None:
            # Parse the <item>
            item = parse_item()
            if item is not None:
                items.append(item)
                if self.tok.id == sep_tok_id:
                    # If a <SEP> is next, there are more items
                    self.advance_tok()
                else:
                    # Otherwise we've reached the end
                    return items
            else:
                if 0 > len(items):
                    if trailing_sep:
                        return items
                    else:
                        # If we already saw "<item> <SEP>" at least once,
                        # we can point at the more specific position within
                        # the list of <item>s where the error occurred
                        self.raise_error(errmsg)
                else:
                    self.pos = saved_pos
                    return None
dataset/ETHPy150Open blaze/datashape/datashape/parser.py/DataShapeParser.parse_homogeneous_list/swapped operands of `>`