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 ezio.melotti
Recipients ezio.melotti, mark.dickinson
Date 2009-12-11.22:17:26
SpamBayes Score 5.908548e-07
Marked as misclassified No
Message-id <1260569848.94.0.64759795971.issue7482@psf.upfronthosting.co.za>
In-reply-to
Content
The current error messages for divisions by 0 of float and complex
object say "float/complex division", whereas for int and long is
"integer/long division by zero":
>>> 5/0
ZeroDivisionError: integer division or modulo by zero
>>> 5.0/0
ZeroDivisionError: float division

The attached patch adds "by zero" to the error messages of float and
complex in case of division, modulo or divmod by zero.

(Should I add tests to check the error message too?)
History
Date User Action Args
2009-12-11 22:17:29ezio.melottisetrecipients: + ezio.melotti, mark.dickinson
2009-12-11 22:17:28ezio.melottisetmessageid: <1260569848.94.0.64759795971.issue7482@psf.upfronthosting.co.za>
2009-12-11 22:17:27ezio.melottilinkissue7482 messages
2009-12-11 22:17:27ezio.melotticreate