Skip to content
Browse files

adding iterator to FilterRowset class

  • Loading branch information...
1 parent 5092296 commit fe04062e19628ab285eea4a55118dad5d801b3e2 @ntt committed Jan 25, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/util.py
View
5 src/util.py
@@ -15,6 +15,7 @@
import time
import math
import cPickle
+import _weakref
from . import _os
@@ -295,6 +296,10 @@ def Sort(self, colname):
ret = Rowset(self.header, self.items.values(), self.RowClass)
return ret.Sort(colname)
+ def __iter__(self):
+ return (self[key] for key in self.iterkeys())
+
+
class IndexedRowLists(dict):
__guid__ = 'util.IndexedRowLists'

0 comments on commit fe04062

Please sign in to comment.
Something went wrong with that request. Please try again.