[docs] [issue28306] incorrect output "int division or modulo by zero" in Handling Exceptions tutorial
Viorel Tabara
report at bugs.python.org
Wed Sep 28 15:33:50 EDT 2016
New submission from Viorel Tabara:
I'm reading the Python 3.5.2 documentation at:
https://docs.python.org/3/tutorial/errors.html#handling-exceptions
which shows the following example:
>>> def this_fails():
... x = 1/0
...
>>> try:
... this_fails()
... except ZeroDivisionError as err:
... print('Handling run-time error:', err)
...
Handling run-time error: int division or modulo by zero
Running the code as a script produces:
$ python3 -V
Python 3.5.2
$ python3 p.py
Handling run-time error: division by zero
$ python2 -V
Python 2.7.12
$ python2 p.py
('Handling run-time error:', ZeroDivisionError('integer division or modulo by zero',))
The same output is listed for 3.6 and 3.7 tutorials but I don't have those
versions installed on my system.
----------
assignee: docs at python
components: Documentation
messages: 277657
nosy: docs at python, viorel
priority: normal
severity: normal
status: open
title: incorrect output "int division or modulo by zero" in Handling Exceptions tutorial
type: behavior
versions: Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28306>
_______________________________________
More information about the docs
mailing list