On 2010-02-08, Sebastian Hungerecker <sepp2k / googlemail.com> wrote:
> On 08.02.2010 20:55, Seebs wrote:
>> It makes more sense to me that
>> "foo"[1] == "o" than that "foo"[1] = 111.  It is a little surprising if I
>> think of it from a C perspective, which is certainly my native perspective,
>> but overall it's a cleaner answer and more consistent with string handling.
>> In particular, it's cleaner because it's consistent with slices of more than
>> one character.:)

> By that logic array[index] should return a single-element array
> instead of the element itself to be more consistent with array
> slicing.

Hmm.  You have a point.

I guess, to me, "foo"[1] should be an o.  If printing it yields a number,
instead of the letter o, something has gone wrong.

-s
-- 
Copyright 2010, all wrongs reversed.  Peter Seebach / usenet-nospam / seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!