Tim Peters added the comment:

Raymond, there are (at least) two bugs here:

1. The original bug report.  Nobody yet has any plausible theory for what went 
wrong there.  So "won't fix" wouldn't be appropriate.  If the OP can't provide 
more information, neither a reproducible test case, then after a while closing 
this report as "works for me" would be appropriate.

2. The "double rounding" bug.  That cannot be the cause of the OP's problem, so 
doesn't really belong in this report.

Nobody knows how rare it is.  I suspect, but have not proved, that 1. - 2.**-53 
is the only random.random() result for which it's possible that double-rounding 
can cause int(i * random.random()) == i.  Given that unlikely - but possible - 
value, there are at least half a million ints 0 < i < 1000000000 for which 
equality holds (but only on platforms where the double rounding bug is 
possible, which doesn't include any platform I use ;-) ).

That probably should get a report of its own.  It's unintended and 
unanticipated behavior, causing simple code to raise a wholly unexpected & 
unpredictable exception.  That's "a bug" to me.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24546>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to