Skip to content

Commit

Permalink
adding iterator to FilterRowset class
Browse files Browse the repository at this point in the history
  • Loading branch information
ntt committed Jan 25, 2012
1 parent 5092296 commit fe04062
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/util.py
Expand Up @@ -15,6 +15,7 @@
import time
import math
import cPickle
import _weakref

from . import _os

Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit fe04062

Please sign in to comment.