[issue32736] random.triangular yields unexpected distribution when args mixed

Raymond Hettinger report at bugs.python.org
Wed Jan 31 18:51:24 EST 2018


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

Sorry, while appreciate the sentiment and how well you articulated it, I'm going to decline this one for the reasons listed in the original discussion at https://bugs.python.org/issue13355 and because it is important to keep this code fast and light (so that large numbers of random variates can be created).  Also, for your own code, it is trivially easy to wrap the existing function with your own error checking.  Lastly, the ship for 2.7 sailed many years ago.  

Note, almost note of the random functions can defend themselves are incorrect argument order.  And who knows, there may be legitimate use cases for having the midpoint not between the low and high.

----------
nosy: +rhettinger
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32736>
_______________________________________


More information about the Python-bugs-list mailing list