Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #56725 > unrolled thread
| Started by | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| First post | 2013-10-12 00:20 -0600 |
| Last post | 2013-10-12 00:20 -0600 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Unicode Objects in Tuples Ian Kelly <ian.g.kelly@gmail.com> - 2013-10-12 00:20 -0600
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2013-10-12 00:20 -0600 |
| Subject | Re: Unicode Objects in Tuples |
| Message-ID | <mailman.1028.1381558852.18130.python-list@python.org> |
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 top | Article view | comp.lang.python
csiph-web