Issue 28306: incorrect output "int division or modulo by zero" in Handling Exceptions tutorial (original) (raw)

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.