[Python-3000] Making more effective use of slice objects in Py3k
Greg Ewing
greg.ewing at canterbury.ac.nz
Mon Aug 28 04:20:18 CEST 2006
Jim Jewett wrote:
> On 8/27/06, Guido van Rossum <guido at python.org> wrote:
> > Any object? And how is that supposed to work for arbitrary
> > objects?
>
> For non-iterables, it will raise a TypeError.
I think the question was what benefit would there be
in a general slice-view object which knew nothing about
the internal structure of the thing it's viewing. The
benefits of the string views we're talking about hinge
on the fact that they're special-purpose and know how
to get directly at the bytes of the underlying string.
--
Greg
More information about the Python-3000
mailing list