Message199380
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. |
|
Date |
User |
Action |
Args |
2013-10-10 11:29:42 | eric.smith | set | recipients:
+ eric.smith, loewis, peter.otten, pitrou, Stephen_Tucker |
2013-10-10 11:29:42 | eric.smith | set | messageid: <1381404582.43.0.0703034935047.issue19210@psf.upfronthosting.co.za> |
2013-10-10 11:29:42 | eric.smith | link | issue19210 messages |
2013-10-10 11:29:42 | eric.smith | create | |
|