On 2/17/2016 3:42 PM, Robert Kern wrote:
random.randint() was the one big exception, and it was considered a
mistake for that very reason, soft-deprecated in favor of
random.randrange().
randrange also has its detractors:
https://code.activestate.com/lists/python-dev/138358/
and following.
I think if we start citing persistant conventions, the
persistent convention across *many* languages that the bounds
provided for a random integer range are inclusive also counts for
something, especially when the names are essentially shared.
But again, I am just trying to be clear about what is at issue,
not push for a change. I think citing non-existent standards
is not helpful. I think the discrepancy between the Python
standard library and numpy for a function going by a common
name is harmful. (But then, I teach.)
fwiw,
Alan
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion