Thomas F. Burdick wrote:
> Nicolas Neuss writes:
[...]
> > (+ (aref entries (+ pos2 -1001))
> > (aref entries (+ pos2 -1))
> > (aref entries (+ pos2 999))
> > (aref entries (+ pos2 -1000))
> > (aref entries (+ pos2 0))
> > (aref entries (+ pos2 1000))
> > (aref entries (+ pos2 -999))
> > (aref entries (+ pos2 1))
> > (aref entries (+ pos2 1001))))))))))
>
> For the big long list of AREFs that are indexed (+ pos2 ...), you're
> not giving Python all the type information you have. You declare POS2
> to be of type FIXNUM, which is the same as saying
> (INTEGER MOST-NEGATIVE-FIXNUM MOST-POSITIVE-FIXNUM). The problem with
> that is that if you add 1 to a fixnum, the result is of type
> (INTEGER (1+ MOST-NEGATIVE-FIXNUM) (1+ MOST-POSITIVE-FIXNUM)).
I am surprised that Python doesn't wrap the index arguments to
AREF in (THE (INTEGER 0 (#.ARRAY-DIMENSION-LIMIT)) ...) forms.
That integer subrange type is a subtype of FIXNUM.
Paul