Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #56725

Re: Unicode Objects in Tuples

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'programmer': 0.03; '(at': 0.04; 'resulting': 0.04; 'interpreter': 0.05; 'string': 0.09; 'agree,': 0.09; 'python': 0.11; 'itself.': 0.14; '(sorry': 0.16; 'interpreter,': 0.16; 'itself,': 0.16; 'ought': 0.16; 'repr': 0.16; 'spurious': 0.16; 'subject:Unicode': 0.16; 'tuple': 0.16; 'tuples,': 0.16; 'utterly': 0.16; ':-)': 0.16; 'wrote:': 0.18; 'meant': 0.20; 'seems': 0.21; '2.x': 0.24; 'helper': 0.24; 'stephen': 0.24; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'function': 0.29; 'am,': 0.29; 'compared': 0.30; 'message-id:@mail.gmail.com': 0.30; 'object.': 0.31; 'fri,': 0.33; 'programmers': 0.33; 'could': 0.34; 'something': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'acceptable': 0.36; 'should': 0.36; 'too': 0.37; 'question,': 0.38; 'to:addr:python- list': 0.38; 'explain': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'even': 0.60; 'more': 0.64; 'between': 0.67; 'different.': 0.84; 'otten': 0.84; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=JaBK5L/T6UX0mgUqTc4a+b67DYZqvE8js0dPds1V1a0=; b=ji1OBroPe+pUGIw3tbZAdyLNaJDd3e0eJX0mf++9VU5+krcji+hHRPxEYWA2Kw7Yk8 1JWeEJCOdnjUYRXWQmDQ6APfR8QAF75+ktxnXan5ZkqkwOdSXrHsSxNeckqDX3mCQ6ID oHsUdQODkRqEyrXiZc0Ros/e0+3DKxFoEN/ZUqBSvNHdxv7oHzQf02QzhqoCJEY2Ffn2 j9Mmqa14PgLNz+HVGQRBr2LOHrR5gOmEu0NLnWJUK5o9WaG3QpDJJ1zdBCRFE1x0mCkY 0BVUtoYcYTmazf1rbOgmZTdTNuxoLdXdmfXvmmTahEN7nuT6JjhH1cVOAM3xyZ5A0CHL 2VNA==
X-Received by 10.66.150.69 with SMTP id ug5mr25917824pab.55.1381558843092; Fri, 11 Oct 2013 23:20:43 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <CAP=-cKVJ10KmWCnc8-86KabXL=EmCSUJpO=jDVBpXmRPH1hHBg@mail.gmail.com>
References <CAP=-cKU6Xkt_rm4VYh7NfXLSfUDG7FZQXHz+U12gP6fbkdhxbQ@mail.gmail.com> <5257C35C.4070407@nedbatchelder.com> <CAP=-cKVJ10KmWCnc8-86KabXL=EmCSUJpO=jDVBpXmRPH1hHBg@mail.gmail.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Sat, 12 Oct 2013 00:20:02 -0600
Subject Re: Unicode Objects in Tuples
To Python <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1028.1381558852.18130.python-list@python.org> (permalink)
Lines 18
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1381558852 news.xs4all.nl 15936 [2001:888:2000:d::a6]:46493
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:56725

Show key headers only | View raw


On Fri, Oct 11, 2013 at 7:31 AM, Stephen Tucker <stephen_tucker@sil.org> wrote:
> On the original question, well, I accept Ned's answer (at 10.22). I also
> like the idea of a helper function given by Peter Otten at 09.51. It still
> seems like a crutch to help poor old Python 2.X to do what any programmer
> (or, at least the programmers like me :-)  ) think it ought to be able to by
> itself. The distinction between the "geekiness" of a tuple compared with the
> "non-geekiness" of a string is, itself, far too geeky for my liking. The
> distinction seems to be an utterly spurious - even artificial or arbitrary
> one to me. (Sorry about the rant.)

I agree, and that's not how I would explain the distinction.  The str
of an object is meant to be human-readable, while the repr of an
object is meant to be something that could be pasted into the
interpreter to reconstruct the object.  In the case of tuples, the
repr of the tuple uses the reprs of the components because the
resulting string will more likely be acceptable to the interpreter,
and the str of the tuple is the same as the repr because there is no
convincing reason why it should be different.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Unicode Objects in Tuples Ian Kelly <ian.g.kelly@gmail.com> - 2013-10-12 00:20 -0600

csiph-web