View Single Post
Old 11-01-2019, 04:40 PM   #4
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,902
Karma: 169810634
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by theducks View Post
When you make an Int from a small fraction, you could end up with a zero .
You really need to test for that before attempting division
In this case, it would seem ratelist would have to have no members for the len to be set to 0. I am also wondering why the conversion to int is being done -- the len() function should be returning an int.

Perhaps a look at how ratelist is being generated and what is being returned? A few print statements to see what is actually being generated?

Last edited by DNSB; 11-01-2019 at 04:44 PM. Reason: Added comment about print statements
DNSB is offline   Reply With Quote