[MERGE] Fix LRUNode referencing
ian.clatworthy at canonical.com
Tue Apr 28 09:00:08 BST 2009
Ian Clatworthy has voted tweak.
Status is now: Conditionally approved
This bit is wrong - you still want node.prev.key ...
- prev = self.prev.key
+ prev_key = self.prev_key
This comment needs tweaking now that the code has moved ...
- elif node is self._last_recently_used:
- self._last_recently_used = node.prev
# We've taken care of the tail pointer, remove the node, and
# at the front
s/We've taken/We take/.
As a minor change, you can also move self.cleanup = None inside the if
block in LRUNode.run_cleanup().
I'd also prefer self._least_recently_used over self._last_recently_used
but it's OK either way.
For details, see:
More information about the bazaar