MRAB <pyt...@mrabarnett.plus.com> writes: > If you're allowed to specify both bounds, why would you be forbidden > from negative ones?
It makes it non-obvious what value should be returned from e.g. search methods that return a negative number on failure. .NET's IndexOf function returns -1, but MaxValue if the array has a negative bound. BinarySearch returns the complement of the nearest index to the value you were searching for, which requires some gymnastics if you want to make use of it for an array that has negative and positive bounds. -- https://mail.python.org/mailman/listinfo/python-list