def run(self):
                """
                runs the overridden fn()
                if fn() returns False, put it on the stack and quit
                so any other pipes will get it and pass it on, quitting
                if fn() returns None, don't put anything
                """
                ret = True 
                while ret is not False:
                        if self.input is None: # it's a faucet
                                ret = self.fn()
                        elif hasattr(self.input, 'get'): # it's a pipe
                                ob = self.input.get()
                                if ob is False:
                                        self.put(ob)
                                        break
                                ret = self.fn(ob)
                        if ret is not None: self.put(ret)

                runs the overridden fn()
                if fn() returns False, put it on the stack and quit
                so any other pipes will get it and pass it on, quitting
                if fn() returns None, don't put anything
                
recipes/Python/496979_threaded_pipes/recipe-496979.py