[Python-3000] Making more effective use of slice objects in Py3k

Josiah Carlson jcarlson at uci.edu
Sun Aug 27 08:23:38 CEST 2006

"Jim Jewett" <jimjjewett at gmail.com> wrote:
> On 8/26/06, Josiah Carlson <jcarlson at uci.edu> wrote:
> > Nick Coghlan <ncoghlan at iinet.net.au> wrote:
> > > There are a couple of existing workarounds for
> > > this: buffer() objects, and the start/stop arguments
> > > to a variety of string methods. Neither of these is
> > > particular convenient to work with, and buffer() is
> > > slated to go away in Py3k.
> > Ahh, but string views offer a significantly more
> > reasonable mechanism.
> As I understand it, Nick is suggesting that slice objects be used as a
> sequence (not just string) view.

I'm not sure there is a compelling use-case for offering views on
general ordered sequences (lists).  Unicode and bytes strings, sure, but
I don't think I've ever really been hurting for faster/more memory
efficient list slicing...  Maybe I'm strange.

 - Josiah

More information about the Python-3000 mailing list