Project

General

Profile

« Previous | Next » 

Revision 14616

lib/csvs.py: MultiFilter: inherit from WrapReader instead of Filter to avoid needing to define a no-op filter_() function

View differences:

trunk/lib/csvs.py
158 158
    
159 159
    def next(self): return self.filter(WrapReader.next(self))
160 160

  
161
class MultiFilter(Filter):
161
class MultiFilter(WrapReader):
162 162
    '''enables applying multiple filters by nesting
163
    @param wrapped_reader outermost_filter(innermost_filter(reader))
163
    @param reader outermost_filter(innermost_filter(reader))
164 164
    '''
165
    def __init__(self, wrapped_reader):
166
        def filter_(row): return row # no-op b/c filtering applied by nesting
167
        Filter.__init__(self, filter_, wrapped_reader)
165
    pass
168 166

  
169 167
std_nulls = [r'\N']
170 168
empty_nulls = [''] + std_nulls

Also available in: Unified diff