def __put(self, key, value):
        try:
            lru_entry = dict.__getitem__(self, key)

            # Replacing an existing value with a new one. Move the entry
            # to the head of the list.

            lru_entry.value = value
            self.__lru_queue.move_to_head(lru_entry)

        except KeyError:
            # Not there. Have to add a new one. Clear out the cruft first.
            # Preserve one of the entries we're clearing, to avoid
            # reallocation.

            lru_entry = self.__clear_to(1 - self.max_capacity)
            if lru_entry:
                lru_entry.key, lru_entry.value = key, value
            else:
                lru_entry = LRUListEntry(key, value)
            self.__lru_queue.add_to_head(lru_entry)

        dict.__setitem__(self, key, lru_entry)
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/grizzled/grizzled/collections/dict.py/LRUDict.__put/swapped operands of `-`