def deferred_output():
        'Works like a forward reference to the "output" global variable'
        for i in output:
            yield i
Works like a forward reference to the "output" global variable
recipes/Python/576961_Technique_for_cyclical_iteration/recipe-576961.py