enhancing slicing

Alex Martelli aleax at aleax.it
Thu Aug 23 15:21:47 CEST 2001

"Roy Smith" <roy at panix.com> wrote in message
news:roy-1DB49F.08271523082001 at news1.panix.com...
> "Juan Valiño" <juanv at posta.unizar.es> wrote:
> > My proposal is to introduce a new operator, for instance # (count):
> > v[5 # 2]
> I don't see that this adds anything to the language that can't be done
> already, other than being another way to do the same thing.

Further, it's such an EASY thing to do -- the proposed
    a[b # c]
is EXACTLY the same as
so where's the added value to justify something as major
as adding a new operator...?

I'd much rather have the modest implementation change to
ensure that a[slice(b,b+c)] did just the same for all
sequences -- it's a rather surprising thing that it fails!


More information about the Python-list mailing list