Daniel Oberski schrieb:
Hello all,I wrote this function to recurse through a tree structure of Nodes connected by Branches. I use a local variable seen_nodes to mark off Nodes already seen by the function (i.e. add them to a list).
That's not a local variable, that is a default argument. Which is in fact only created once for each function, yes.
http://effbot.org/pyfaq/why-are-default-values-shared-between-objects.htm Diez -- http://mail.python.org/mailman/listinfo/python-list