Python supports indexes on arrays, and they work reasonably:
Now, it gets strange when you use negative indexes…
As it turns out, the same is true if you create an array in Python Numeric or Scipy: you can actually use negative indexes. Behold:
>>> from scipy import *
As it turns out, a[-x] is mapped to a[x%len(a)] or something like it. I cannot tell whether this is a bug or was meant to be that way. Any other language supports negative indexing? Why would you want this “feature”?
Update: Thanks to all my readers, I’m now aware that this is a standard and well documented feature of Python, special thanks to Toby and Will. Thanks to didier for pointing out that Perl supports them too.