Most viewed recipes tagged "recursive_iterator" Code RecipesRecursively walk Python objects (Python) 2011-12-23T22:10:38-08:00Yaniv Aknin <p style="color: grey"> Python recipe 577982 by <a href="/recipes/users/4180246/">Yaniv Aknin</a> (<a href="/recipes/tags/container/">container</a>, <a href="/recipes/tags/recursive/">recursive</a>, <a href="/recipes/tags/recursive_iterator/">recursive_iterator</a>, <a href="/recipes/tags/walk/">walk</a>). Revision 2. </p> <p>A small function that walks over pretty much any Python object and yields the objects contained within (if any) along with the path to reach them. I wrote it and am using it to validate a deserialized data-structure, but you can probably use it for many things.</p> Technique for cyclical iteration II (Python) 2010-01-20T03:54:15-08:00Jakub Wroniecki <p style="color: grey"> Python recipe 577014 by <a href="/recipes/users/4172837/">Jakub Wroniecki</a> (<a href="/recipes/tags/cyclic_iterator/">cyclic_iterator</a>, <a href="/recipes/tags/recursive_iterator/">recursive_iterator</a>). </p> <p>Inspired by this recipe: <a href="" rel="nofollow"></a>, I played a little with the code and came with a more general piece of code implementing recursive iterators.</p>