Re: [Python-3000] UPDATED: PEP 3138- String representation in Python 3000

2008-05-27 Thread Greg Ewing
Jim Jewett wrote: Again, what is the advantage of having str(x) be redundant to repr(x) in the case of containers? I think you're misrepresenting the situation when you describe it that way. Guido didn't sit down and think "I know, let's make str(lst) do the same as repr(lst)." He thought "It'

Re: [Python-3000] UPDATED: PEP 3138- String representation in Python 3000

2008-05-27 Thread Jim Jewett
On 5/27/08, Greg Ewing <[EMAIL PROTECTED]> wrote: > Blake Winton wrote: > > Seriously, I can write: > > >>> print 1, "1", Decimal("1") > > and get as my output: > > 1 1 1 > Yes, but you've explicitly told it to print that, > so presumably it's what you want in that case. > Equally, you need

Re: [Python-3000] UPDATED: PEP 3138- String representation in Python 3000

2008-05-27 Thread Greg Ewing
Blake Winton wrote: Seriously, I can write: >>> print 1, "1", Decimal("1") and get as my output: 1 1 1 Yes, but you've explicitly told it to print that, so presumably it's what you want in that case. Equally, you need to be explicit about how you want a list printed. -- Greg ___

Re: [Python-3000] UPDATED: PEP 3138- String representation in Python 3000

2008-05-27 Thread Jim Jewett
On 5/27/08, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Blake Winton wrote: > > 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 c

Re: [Python-3000] UPDATED: PEP 3138- String representation in Python 3000

2008-05-27 Thread Nick Coghlan
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 w

Re: [Python-3000] UPDATED: PEP 3138- String representation in Python 3000

2008-05-27 Thread Adam Olsen
On Tue, May 27, 2008 at 2:03 PM, Jim Jewett <[EMAIL PROTECTED]> wrote: > On 5/26/08, Nick Coghlan <[EMAIL PROTECTED]> wrote: >> > The problem isn't that I want to be able to write code that acts the >> > old way; the problem is that I want to ensure all code running on my >> > system acts the old w

Re: [Python-3000] UPDATED: PEP 3138- String representation in Python 3000

2008-05-27 Thread Jim Jewett
On 5/26/08, Nick Coghlan <[EMAIL PROTECTED]> wrote: > > The problem isn't that I want to be able to write code that acts the > > old way; the problem is that I want to ensure all code running on my > > system acts the old way. > This is for Py3k - you'll be lucky if your old code runs at all, let

[Python-3000] UPDATED: PEP 3138- String representation in Python 3000

2008-05-24 Thread Atsuo Ishimoto
I updated a PEP 3138 - String representation in Python 3000. Python wiki is also updated. (http://wiki.python.org/moin/Python3kStringRepr) I would appreciate your comments and help. --- PEP: 3138 Title: String representation in Python 3000 Version: $R