Recursive structures

Leif K-Brooks eurleif at ecritters.biz
Mon Dec 20 14:27:07 EST 2004


bearophileHUGS at lycos.com wrote:
> While using some nested data structures, I've seen that I'd like to
> have a function that tells me if a given data structure contains one or
> more cyclic references (a way to recognise a cycle in a graph is to do
> a depth-first search, marking vertices along the way. An already marked
> vertex means a cycle.)
> Do you know where I can find a function like this?

http://python.org/doc/current/lib/module-pprint.html#l2h-749



More information about the Python-list mailing list