[Python-Dev] OOps (was: No 1.6! (was Re: A REALLY COOL PYTHON FEATURE:))

Tim Peters tim_one@email.msn.com
Tue, 23 May 2000 01:15:46 -0400


[Christian Tismer]
> There was a smiley, but for the most since I cannot
> decide what I want. I'm quite convinced that strings should
> better not be sequences, at least not sequences of strings.
>
> "abc"[0:1] would be enough, "abc"[0] isn't worth the side effects,
> as listed in Tim's posting.

Oh, it's worth a lot more than those!  As Ping testified, the gotchas I
listed really don't catch many people, while string[index] is about as
common as integer+1.

The need for tuples specifically in "format % values" can be wormed around
by special-casing the snot out of a string in the "values" position.

The non-termination of repeated "string = string[0]" *could* be stopped by
introducing a distinct character type.  Trying to formalize the current type
of a string is messy ("string = sequence of string" is a bit paradoxical
<wink>).  The notion that a string is a sequence of characters instead is
vanilla and wholly natural.  OTOH, drawing that distinction at the type
level may well be more trouble in practice than it buys in theory!

So I don't know what I want either -- but I don't want *much* <wink>.

first-do-no-harm-ly y'rs  - tim