[Python-Dev] Re: [snake-farm] test test_slice failed -- [9, 7, 5, 3, 1] == [0]

Neal Norwitz neal@metaslash.com
Wed, 06 Nov 2002 09:12:44 -0500


On Wed, Nov 06, 2002 at 01:56:54PM +0000, Michael Hudson wrote:

> > But this didn't produce the correct results:
> > 
> >         >>> range(10)[::sys.maxint-1]
> >         []
> 
> Wierd.  Shall dig.
> 
> Nice how you get warnings from the system header files on that alpha
> isn't it?

:-)  Quite nice.

> Works for me!

Hmmm.  The only difference I can see is that I'm running a debug build.

> mwh@usf-cf-alpha-linux-1:~/python$ ./python 
> Python 2.3a0 (#2, Nov  6 2002, 05:44:13) 
> [GCC 2.95.4 20011002 (Debian prerelease)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import sys
> >>> range(10)[::sys.maxint - 2]
> [0]
>
> Try again?  Can you try playing with gdb to see what's going on?

I built again w/o debug and it made no difference.  Both times
I did a make clean first.  I'll take a look later.

If it works for you, go ahead and check in.  Maybe we patched
something different.

Neal