Why not just show the out-of-range index?

BJörn Lindqvist bjourne at gmail.com
Mon Dec 4 18:35:37 EST 2006


On 12/4/06, Fredrik Lundh <fredrik at pythonware.com> wrote:
> BJörn Lindqvist wrote:
>
> >> > Sorry I haven't thought this through 100%
> >>
> >> obviously not.
> >
> > And you're not helping.
>
> I've already explained why something like PyObject_IsIndexOutOfBounds
> cannot work earlier in this thread.

Maybe so, but that doesn't mean that it is not possible to make the
IndexError messages Pythons sequence objects throws better. You don't
need to change the semantics of x[i].

-- 
mvh Björn



More information about the Python-list mailing list