[Python-3000] Making more effective use of slice objects in Py3k
Fredrik Lundh
fredrik at pythonware.com
Fri Sep 1 08:05:18 CEST 2006
Guido van Rossum wrote:
> BTW, in some sense Python 2.x *has* polymorphic strings -- str and
> unicde have the same API (99% anyway) but different implementations,
> and there's even a common abstract base class (basestring). But this
> clearly isn't what the ObjectiveC folks want to see!
on the Python level, absolutely. the "use 8-bit strings for ASCII,
Unicode strings for everything else" approach works perfectly well.
I'm still a bit worried about C API complexities, but as I mentioned, in
today's Python, only 8-bit strings are really simple. and there are
standard ways to deal with backing stores; if that's good enough for
apple hackers, it should be good enough for pythoneers.
most of this can be prototyped and benchmarked under 2.X, and parts of
it can be directly useful also for 2.X developers; I think I'll start
tinkering.
> These people are quite familiar with ObjectiveC. ObjectiveC has true
> polymorphic strings, and the internal representation *can* be UTF-8.
> These developers love that.
you are aware that Objective C does provide B-tree strings under the
hood too, I hope ;-)
</F>
More information about the Python-3000
mailing list