[issue13355] random.triangular error when low = mode

2011-11-06 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue13355] random.triangular error when low = mode

2011-11-06 Thread Mark Dickinson
Mark Dickinson added the comment: > it would be convenient if low=high=mode returned low (or mode or high) Yes, I agree that random.triangular should degrade gracefully, in the same way that random.uniform does. -- ___ Python tracker

[issue13355] random.triangular error when low = mode

2011-11-06 Thread Mark
Mark added the comment: Many thanks, Mark. I'm very new to python so apologies for my obvious mistake (you were absolutely right, I was feeding the high and mode in back to front). As a separate aside, it would be convenient if low=high=mode returned low (or mode or high) rather than error b

[issue13355] random.triangular error when low = mode

2011-11-06 Thread Mark Dickinson
Mark Dickinson added the comment: I can't reproduce this: Python 2.7.2 |EPD 7.1-2 (32-bit)| (default, Jul 3 2011, 15:40:35) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "packages", "demo" or "enthought" for more information. >>> from random import triangular >>> triangular(low=1, high=2

[issue13355] random.triangular error when low = mode

2011-11-06 Thread Mark
New submission from Mark : When low and mode are the same in random.triangular it gives the following error: : float division args = ('float division',) message = 'float division' When high and mode are the same there is no problem. -- components: Extension Modules mess