summaryrefslogtreecommitdiff
path: root/Doc/tutorial/errors.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-09-04 07:15:32 +0000
committerGeorg Brandl <georg@python.org>2007-09-04 07:15:32 +0000
commitfdec8fd325ae9160e0dd245b775692f7e2716f3d (patch)
tree9ae72a8fda9c8e6fd4f3be11881b32c43ab63a6c /Doc/tutorial/errors.rst
parent8411d88883909df0d1228953ec79cc55f837f329 (diff)
downloadcpython-fdec8fd325ae9160e0dd245b775692f7e2716f3d.tar.gz
Convert all print statements in the docs.
Diffstat (limited to 'Doc/tutorial/errors.rst')
-rw-r--r--Doc/tutorial/errors.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst
index e3c631ff76..aa367e39f6 100644
--- a/Doc/tutorial/errors.rst
+++ b/Doc/tutorial/errors.rst
@@ -26,7 +26,7 @@ complaint you get while you are still learning Python::
The parser repeats the offending line and displays a little 'arrow' pointing at
the earliest point in the line where the error was detected. The error is
caused by (or at least detected at) the token *preceding* the arrow: in the
-example, the error is detected at the keyword :keyword:`print`, since a colon
+example, the error is detected at the function :func:`print`, since a colon
(``':'``) is missing before it. File name and line number are printed so you
know where to look in case the input came from a script.
@@ -181,8 +181,8 @@ desired. ::
... print(inst.args) # arguments stored in .args
... print(inst) # __str__ allows args to be printed directly
... x, y = inst # __getitem__ allows args to be unpacked directly
- ... print 'x =', x
- ... print 'y =', y
+ ... print('x =', x)
+ ... print('y =', y)
...
<type 'Exception'>
('spam', 'eggs')
@@ -260,7 +260,7 @@ directly or indirectly. For example::
>>> try:
... raise MyError(2*2)
... except MyError as e:
- ... print 'My exception occurred, value:', e.value
+ ... print('My exception occurred, value:', e.value)
...
My exception occurred, value: 4
>>> raise MyError, 'oops!'