So if I understood correctly the recursive structure isn't a problem for python because "a" contains a reference to "a", not "a" itself. On the other hand, print works ok because it has a special trap to detect recursive structures. I think I understand it now. Thnks for your replies, miz.