Re: A short question about non-ascii characters in list

2007-09-17 Thread Bjoern Schliessmann
js wrote: > That's make sence, but it's also true that > sometimes we want to see the contents of a list in pretty format. That may be true, but most of the time not (at least not me) -- lists are no pretty printing instrument, but a container. > So for now I need to write and use crappy mylist l

Re: A short question about non-ascii characters in list

2007-09-17 Thread js
Thank you for your quick reply. > It's intentional. __str__ of a list uses the __repr__ of its > elements. This helps reduce confusion (e.g., between ['a', 'b, c'] > and ['a, b', 'c']). That's make sence, but it's also true that sometimes we want to see the contents of a list in pretty format. S

Re: A short question about non-ascii characters in list

2007-09-16 Thread Dan Bishop
On Sep 17, 12:08 am, js <[EMAIL PROTECTED]> wrote: > >>> print u"äöü" > äöü > >>> print [u"äöü"] > > [u'\xe4\xf6\xfc'] > > Python seems to treat non-ASCII chars in a list differently from the > one in the outside of a list. > I think this behavior is so inconvenient and actually makes debugging > w

A short question about non-ascii characters in list

2007-09-16 Thread js
>>> print u"äöü" äöü >>> print [u"äöü"] [u'\xe4\xf6\xfc'] Python seems to treat non-ASCII chars in a list differently from the one in the outside of a list. I think this behavior is so inconvenient and actually makes debugging work harder. Is this an intentional? Is there any doc discussing about