def update(self, iterable):
_lists = self._lists<EOL>_maxes = self._maxes<EOL>values = sorted(iterable)<EOL>if _maxes:<EOL><INDENT>if len(values) * <NUM_LIT:4> >= self._len:<EOL><INDENT>values.extend(chain.from_iterable(_lists))<EOL>values.sort()<EOL>self._clear()<EOL><DEDENT>else:<EOL><INDENT>_add = self.add<EOL>for val in values:<EOL><INDENT>_add(val)<EOL><DEDENT>return<EOL><DEDENT><DEDENT>_load = self._load<EOL>_lists.extend(values[pos:(pos + _load)]<EOL>for pos in range(<NUM_LIT:0>, len(values), _load))<EOL>_maxes.extend(sublist[-<NUM_LIT:1>] for sublist in _lists)<EOL>self._len = len(values)<EOL>del self._index[:]<EOL>
Update the list by adding all elements from *iterable*.