Blake Winton wrote:
Nick Coghlan wrote:
While it could be argued that if you want unambiguous output you should be invoking repr() on the container instead of str(), I'm still seeing many more downsides than upsides to the idea of making str() on the builtin containers display their contents with str() instead of repr().

But which downsides do you see that aren't solved by the use of repr to get unambiguous output?

The fact that calling str() on containers has been unambiguous for years. All I'm saying is that no compelling use cases have been presented to justify changing the status quo (aside from the Unicode escaping problem, which is better addressed by allowing repr() to return arbitrary Unicode glyphs as proposed by PEP 3138, since that also fixes a bunch of other cases where repr() is invoked on Unicode strings).

Cheers,
Nick.

--
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
            http://www.boredomandlaziness.org
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to