This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Stephen_Tucker
Recipients Stephen_Tucker, eric.smith, loewis, peter.otten, pitrou
Date 2013-10-10.19:45:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAP=-cKUu-iTCPaGYya3vm+tNtdhNt0=280Uiy6scjP4HTfjGOw@mail.gmail.com>
In-reply-to <1381404582.43.0.0703034935047.issue19210@psf.upfronthosting.co.za>
Content
Martin: Yes, I agree this does not demonstrate the issue I reported - so
far as  print  is concerned. The other issue in my original report was that
the same behaviour is exhibited when tuples are read from a utf-8 - encoded
file where a tuple which has a unicode string in it with a non-ASCII
character is displayed with its non-ASCII characters as escapes.

Eric:  I am in a quandary. I am not convinced that the appearance of such
strings (under either circumstance) should be governed by whether they are
in tuples or not. It still seems remarkably like a bug to me. However, I am
happy to continue this discussion on Python-list, if you consider it better
to do that. Please, can you tell me, how do I do that?

On Thu, Oct 10, 2013 at 12:29 PM, Eric V. Smith <report@bugs.python.org>wrote:

>
> Eric V. Smith added the comment:
>
> As Martin points out, your first example is printing a string, not a
> tuple. The parens here are not building a tuple, they are just used for
> grouping in the expression, and are not doing anything in this example.
>
> So my explanation still holds: everything is working as designed. The
> output of the first two print statements uses str(astring), the second two
> use str(atuple).
>
> repr of a tuple is effectively:
> "(" + ", ".join(repr(item) for item in tuple) + ")"
>
> So when printing your tuples, Python is using the repr of each string in
> the tuple.
>
> Since this is not a bug or feature request, it's probably best to continue
> the discussion on python-list.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue19210>
> _______________________________________
>
History
Date User Action Args
2013-10-10 19:45:05Stephen_Tuckersetrecipients: + Stephen_Tucker, loewis, peter.otten, pitrou, eric.smith
2013-10-10 19:45:05Stephen_Tuckerlinkissue19210 messages
2013-10-10 19:45:05Stephen_Tuckercreate