slicing lists

castironpi at gmail.com castironpi at gmail.com
Fri May 9 16:17:57 EDT 2008


On May 9, 10:11 am, Yves Dorfsman <y... at zioup.com> wrote:
> castiro... at gmail.com wrote:
> > The only thing is, is there is another natural meaning to [a,b:c].
>
> > Counting grids on the diagonals, the rational set is well defined:
>
> > 0: 0, 0
> > 1: 1, 0
> > 2: 0, 1
> > 3: 2, 0
> > 4: 1, 1
> > 5: 0, 2
> > 6: 3, 0
> > 7: 2, 1
> > ...
>
> > Thencefore ( 2, 0 ) : ( 3, 0 ) is well defined.  Thencefore,
>
> > a,b:c,d
>
> > is not; x[a,b:c,d]= x[a]+ x[b:c]+ x[d].
>
> I'm not sure what you mean here. Could you give me a simple piece of code to
> show an example ?
>
> Yves.http://www.SollerS.ca- Hide quoted text -
>
> - Show quoted text -

Yves, sadly, simple piece of code is not the writer's forte.  I was
merely advising against leaping in to syntax additions, changes even.
The point was, even though a,b:c,d is shown ill-defined, a,b:c may not
be.



More information about the Python-list mailing list