def iter_streams(input_): null = Stream(input_, 'string') null.frobber = 'raw' yield null for frobber in iter_frobbers(): stream = frobber(null) if stream: yield stream
def _(stream): type_ = 'number' things = list(fn(stream)) if not things: return None if any((isinstance(x, float) for x in things)): type_ = 'float' s = Stream(things, type_) s.frobber = name return s