This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | mokeefe |
|---|---|
| Recipients | mokeefe |
| Date | 2008年07月08日.08:44:01 |
| SpamBayes Score | 1.1924271e-06 |
| Marked as misclassified | No |
| Message-id | <1215506646.09.0.809082477748.issue3319@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
The following call results in a ZeroDivisionError in python 2.5.2 and python 3.0 alpha 3 (I presume this is also an issue for Python 2.6 but I can't explicitly confirm): >>> from test import pystone >>> pystone.main(10) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/test/pystone.py", line 61, in main benchtime, stones = pystones(loops) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/test/pystone.py", line 68, in pystones return Proc0(loops) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/test/pystone.py", line 131, in Proc0 return benchtime, (loops / benchtime) ZeroDivisionError: float division Note the patch I submitted checks if the benchtime is equal to 0.0 (which apparently happens on my Mac OS 10.5 PPC). If this is the case I arbitrarily set the benchtime to 1e-6. I'm not sure what the units of the benchtime variable is (seconds?). Anyhow, this fixes the issue but can someone review to confirm this is the correct behavior? Thanks! -Michael |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年07月08日 08:44:06 | mokeefe | set | spambayes_score: 1.19243e-06 -> 1.1924271e-06 recipients: + mokeefe |
| 2008年07月08日 08:44:06 | mokeefe | set | spambayes_score: 1.19243e-06 -> 1.19243e-06 messageid: <1215506646.09.0.809082477748.issue3319@psf.upfronthosting.co.za> |
| 2008年07月08日 08:44:04 | mokeefe | link | issue3319 messages |
| 2008年07月08日 08:44:03 | mokeefe | create | |