New submission from Ezio Melotti <ezio.melo...@gmail.com>: 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?) ---------- assignee: ezio.melotti components: Interpreter Core files: issue7482.patch keywords: needs review, patch, patch messages: 96275 nosy: ezio.melotti, mark.dickinson priority: normal severity: normal stage: patch review status: open title: Improve ZeroDivisionError message for float and complex object versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file15528/issue7482.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7482> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com