Re: Walking an object/reference graph

2009-10-05 Thread Simon Forman
On Mon, Oct 5, 2009 at 3:59 AM, Austin Bingham wrote: > I'm looking for the proper way to "walk" a graph of python objects. My > specific task is to find all objects of a given type that are referred > to (transitively) by some starting object. My approach has been to > loop through the object's a

Re: Walking an object/reference graph

2009-10-05 Thread MRAB
Austin Bingham wrote: I'm looking for the proper way to "walk" a graph of python objects. My specific task is to find all objects of a given type that are referred to (transitively) by some starting object. My approach has been to loop through the object's attributes, examining each, and then rec

Walking an object/reference graph

2009-10-05 Thread Austin Bingham
I'm looking for the proper way to "walk" a graph of python objects. My specific task is to find all objects of a given type that are referred to (transitively) by some starting object. My approach has been to loop through the object's attributes, examining each, and then recursing on them. This ap