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
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
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