Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-02-28 10:47:23

David Abrahams wrote:

> > > expected a b c d
> > > with x= a
> > > x[--2] == a
> > > expected
> >
> > Sorry for that... I forgot to commit check-jam-patches.jam, which does
> > not include this test. When mergning expand.c I have decided that "--2"
> > is too confusing and omitted it? Do we need it, especially as we "-2"
> > means nothing in Perforce Jam, and means "second element from the end" in
> > Boost.Jam?
> I don't know if we need it, but it seems a logical analogy to Python
> slicing, where x[:-2] does the same thing.

True, but in Python we have x[:2], and we can't have this in Jam because it
will conflict with negative indices.

> As far as I'm concerned, it would be OK to require it be written x[1--2] if
> that's what you're suggesting.

I suggest precisely that, so seems like we've agreed.

- Volodya


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at