On 11/21/2014 08:43 PM, Steven D'Aprano wrote:
> random...@fastmail.us wrote:
>> 
>> I think I tried on at least one python version and printing the tuple
>> crashed with a recursion depth error, since it had no special protection
>> for this case the way list printing does.
> 
> It works fine now (Python 3.3).
> 
> py> L = []
> py> t = (L, None)
> py> L.append(L)
> py> L.append(t)  # For good measure.
> py> print(t)
> ([[...], (...)], None)

This is a tuple in a list in a tuple, not a tuple in a tuple.

--
~Ethan~

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to