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
> work harder.
>
> Is this an intentional? Is there any doc discussing about this?

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']).

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

Reply via email to