Duncan Booth wrote: > Better, just don't try passing it a recursive data structure. > >>>> a = [1, 2, 3] >>>> a[1] = a >>>> a > [1, [...], 3] >>>> tupleize(a) > > > Traceback (most recent call last): > File "<pyshell#5>", line 1, in <module> > tupleize(a) > File "<pyshell#1>", line 5, in tupleize > return tuple(tupleize(thing) for thing in non_tuple) > File "<pyshell#1>", line 5, in <genexpr> > return tuple(tupleize(thing) for thing in non_tuple) > File "<pyshell#1>", line 5, in tupleize > return tuple(tupleize(thing) for thing in non_tuple) > File "<pyshell#1>", line 5, in <genexpr> > return tuple(tupleize(thing) for thing in non_tuple) > File "<pyshell#1>", line 5, in tupleize > return tuple(tupleize(thing) for thing in non_tuple) > ...
Your'e a fiend! ;) /W -- http://mail.python.org/mailman/listinfo/python-list