Minor code cleanups.

This commit is contained in:
Bastian Kleineidam 2011-12-17 19:13:54 +01:00
parent 4e18858c7a
commit de652d8138
2 changed files with 2 additions and 3 deletions

View file

@ -210,8 +210,8 @@ class LFUCache (dict):
# sorting function for items
keyfunc = lambda x: x[1][0]
values = sorted(items, key=keyfunc)
for key, value in values[0:trim]:
del self[key]
for item in values[0:trim]:
del self[item[0]]
def __getitem__ (self, key):
"""Update key usage and return value."""

View file

@ -17,7 +17,6 @@
"""Read and store QSettings for this application."""
from PyQt4 import QtCore
from .validator import check_regex
def save_point (qpoint):