Popular recipes by Michael Pust http://code.activestate.com/recipes/users/4166509/2008-08-18T19:59:03-07:00ActiveState Code RecipesLazy Lists for python 2.5 (Python) 2008-08-18T19:59:03-07:00Michael Pusthttp://code.activestate.com/recipes/users/4166509/http://code.activestate.com/recipes/576429-lazy-lists-for-python-25/ <p style="color: grey"> Python recipe 576429 by <a href="/recipes/users/4166509/">Michael Pust</a> (<a href="/recipes/tags/generators/">generators</a>, <a href="/recipes/tags/lazy/">lazy</a>, <a href="/recipes/tags/memoization/">memoization</a>). </p> <p>Dan Spitz submitted a recipe ( <a href="http://code.activestate.com/recipes/576410/">576410</a> ) for recursively defined lazy lists backed by a generator. Only catch was that it was written for python 3k. But there is nothing intrinsic in 3k that prevents you from having the same functionality in python 2.5, so I am supplying the backport here.</p>