Re: Re[4]: Re: Comprehensions

"Mark Hahn" <[email protected]> Wed, 14 Jul 2004 20:36:36 -0700
Newsgroups gmane.comp.lang.prothon.user
Message-ID <003e01c46a1c$ef367a90$0d01a8c0@MarkVaio>
From: "Lenard Lindstrom"

> > > Slice lists and ellipses in subsripts for user defined sequences.
> >
> > Hmm.  Are these in Python?  If not, then can you elaborate?
> >
> I believe they are for use by the Numeric module.
>
> Slice lists:
>
> seq[1, 4, 8:10]
>
> Since in Python it is the comma, not parenthesis, that create a tuple,
> having comma separated items in a subscript passes a tuple of items
> to the subscript handler method.
>
> ellispses:
>
> seq[...]
>
> Passes a special Ellipses object to the subscript method.
>
> These are covered in section 5.3.3, Slices, of the Python Language
> Reference. They are not currently used by Python lists and tuples.

I'll include them.  I don't see any usage for the ellipses but it doesn't
hurt to have them in the parser.