Permalink
Browse files

Fixed __iter__ bug, inherited from object

  • Loading branch information...
1 parent fb1cd03 commit 01131ffd22f26d7ac36bb80299b75363e4a527e3 @hoffmann committed Jan 7, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 leveldict.py
View
@@ -3,7 +3,7 @@
import json
-class LevelDict(DictMixin):
+class LevelDict(object, DictMixin):
"""Dict Wrapper around the Google LevelDB Database"""
def __init__(self, path):
"""Constructor for LevelDict"""
@@ -20,8 +20,8 @@ def __delitem__(self, key):
self.db.Delete(key)
def __iter__(self):
- for k, v in self.db.RangeIter():
- yield v
+ for k, v in self.db.RangeIter(include_value=False):
+ yield k
def keys(self):
return [k for k, v in self.db.RangeIter()]

0 comments on commit 01131ff

Please sign in to comment.