[issue19210] Unicode Objects in Tuples

2013-10-11 Thread Martin v . Löwis
Martin v. Löwis added the comment: It's at https://mail.python.org/mailman/listinfo/python-list -- ___ Python tracker ___ ___ Python-b

[issue19210] Unicode Objects in Tuples

2013-10-10 Thread R. David Murray
R. David Murray added the comment: python-list is a mailing list, so you would subscribe and post your questions and examples there. There are very good reasons for the existing behavior, and python-list would be a good place for you to learn about them (by asking questions). The file case i

[issue19210] Unicode Objects in Tuples

2013-10-10 Thread Stephen Tucker
Stephen Tucker added the comment: 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

[issue19210] Unicode Objects in Tuples

2013-10-10 Thread Eric V. Smith
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 wor

[issue19210] Unicode Objects in Tuples

2013-10-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: Stephen: do you agree that your example actually doesn't demonstrate the issue you originally reported? Your first to print statements don't actually print a tuple, whereas the latter two do, and the string gets always escaped in the tuple, and never when pri

[issue19210] Unicode Objects in Tuples

2013-10-10 Thread Stephen Tucker
Stephen Tucker added the comment: Dear All (Eric Smith in particular), I see the issue has been closed - I guess that I have to use e-mail to continue this discussion. I attach a source file that demonstrates the "feature", and the output from IDLE that it generated. Yours, Stephen Tucker. O

[issue19210] Unicode Objects in Tuples

2013-10-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed, this is a feature, even though it may seem an odd one. -- nosy: +pitrou resolution: -> invalid status: open -> closed ___ Python tracker __

[issue19210] Unicode Objects in Tuples

2013-10-09 Thread Eric V. Smith
Eric V. Smith added the comment: This isn't strictly related to printing a tuple. It's the difference between str() and repr(): >>> print (u"äöü") # uses str äöü >>> print repr(u"äöü") u'\xe4\xf6\xfc' When the tuple is printed, it uses the repr of its constituent parts. -- _

[issue19210] Unicode Objects in Tuples

2013-10-09 Thread Peter Otten
Peter Otten added the comment: Be aware that for a 1-tuple the trailing comma is mandatory: >>> print (u"äöü") # this is a string despite the suggestive parens äöü >>> print (u"äöü",) # this is a tuple (u'\xe4\xf6\xfc',) -- nosy: +peter.otten ___ Pyt

[issue19210] Unicode Objects in Tuples

2013-10-09 Thread Eric V. Smith
Eric V. Smith added the comment: Can you provide some code which demonstrates this? It's easier to address this if we have known working (or non-working) examples. Thanks. -- nosy: +eric.smith ___ Python tracker

[issue19210] Unicode Objects in Tuples

2013-10-09 Thread Stephen Tucker
New submission from Stephen Tucker: If a tuple consists of a single unicode object with non-ASCII characters in it, the printing of the tuple causes the non-ASCII characters to appear correctly as characters. If the tuple contains such a unicode object and anything else (even if it contains n