<div dir="ltr">Also fwiw, I think the 0-based, half-open interval is one of the best features of Python indexing and yes, I do use random integers to index into my arrays and would not appreciate having to litter my code with "-1" everywhere.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 18, 2016 at 10:29 AM, Alan Isaac <span dir="ltr"><<a href="mailto:alan.isaac@gmail.com" target="_blank">alan.isaac@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2/17/2016 3:42 PM, Robert Kern wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
random.randint() was the one big exception, and it was considered a<br>
mistake for that very reason, soft-deprecated in favor of<br>
random.randrange().<br>
</blockquote>
<br>
<br></span>
randrange also has its detractors:<br>
<a href="https://code.activestate.com/lists/python-dev/138358/" rel="noreferrer" target="_blank">https://code.activestate.com/lists/python-dev/138358/</a><br>
and following.<br>
<br>
I think if we start citing persistant conventions, the<br>
persistent convention across *many* languages that the bounds<br>
provided for a random integer range are inclusive also counts for something, especially when the names are essentially shared.<br>
<br>
But again, I am just trying to be clear about what is at issue,<br>
not push for a change.  I think citing non-existent standards<br>
is not helpful.  I think the discrepancy between the Python<br>
standard library and numpy for a function going by a common<br>
name is harmful.  (But then, I teach.)<br>
<br>
fwiw,<div class="HOEnZb"><div class="h5"><br>
Alan<br>
<br>
<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org" target="_blank">NumPy-Discussion@scipy.org</a><br>
<a href="https://mail.scipy.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</div></div></blockquote></div><br></div>