def set_items(self, items):
        widget = self.widget
        count = widget.count()
        nitems = len(items)
        for idx, item in enumerate(items[:count]):
            widget.setItemText(idx, item)
        if nitems > count:
            for item in items[count:]:
                widget.addItem(item)
        elif nitems < count:
            for idx in reversed(xrange(nitems, count)):
                widget.removeItem(idx)
Get the builder query grammar
dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/qt/qt_combo_box.py/QtComboBox.set_items--crossover with--dataset/ETHPy150Open sdispater/orator/orator/query/builder.py/QueryBuilder.get_grammar