[Cython] Please vote: wraparound directive
Robert Bradshaw
robertwb at math.washington.edu
Fri May 1 20:43:20 CEST 2009
On May 1, 2009, at 5:28 AM, Dag Sverre Seljebotn wrote:
> A new directive which allows Cython to assume that integers passed
> to []
> are not negative.
>
> Currently buffers have the negative_indices option:
>
> object[int, negative_indices=False] arr = ...
>
> but this can be cumbersome and less flexible. The rationale for not
> doing this in the first place was that it changes semantics during
> normal running rather than under exceptional circumstances, but now
> @cdivision has crossed that line anyway.
Yes, I like this. I think directives are more explicit and easier to
follow than extra data attached to types.
> Also note that this could potentially apply to typed lists and
> tuples as
> well, if there's a benefit.
Yes, there is a potential benefit here.
- Robert
More information about the Cython-dev
mailing list