On Mon, 17 Mar 2008 05:28:19 -0700, castironpi wrote: > a tuple is a data > structure such which cannot contain a refrence to itself.
>>> a = [] # a list >>> b = (a, None) # a tuple >>> a.append(b) >>> print b ([([...], None)], None) >>> b[0][0] is b True So, yes tuples can contain a reference to themselves, but only indirectly. > Can a single expression refer to itself ever? You can't refer to an object until it exists, so no. -- Steven -- http://mail.python.org/mailman/listinfo/python-list