summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial/errors.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-05-10 09:01:23 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-05-10 09:01:23 (GMT)
commitdba903993a8d3e13d2cf83d6a8912e908025b17b (patch)
treeb0f7d957452d40ce384e5d0a1382067e3379f60f /Doc/tutorial/errors.rst
parent387235085c5a6a1d823b0af3fabb42830c88f984 (diff)
downloadcpython-dba903993a8d3e13d2cf83d6a8912e908025b17b.zip
cpython-dba903993a8d3e13d2cf83d6a8912e908025b17b.tar.gz
cpython-dba903993a8d3e13d2cf83d6a8912e908025b17b.tar.bz2
Issue #23921: Standardized documentation whitespace formatting.
Original patch by James Edwards.
Diffstat (limited to 'Doc/tutorial/errors.rst')
-rw-r--r--Doc/tutorial/errors.rst16
1 files changed, 8 insertions, 8 deletions
diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst
index 351ee52..4195c7e 100644
--- a/Doc/tutorial/errors.rst
+++ b/Doc/tutorial/errors.rst
@@ -170,15 +170,15 @@ reference ``.args``. One may also instantiate an exception first before
raising it and add any attributes to it as desired. ::
>>> try:
- ... raise Exception('spam', 'eggs')
+ ... raise Exception('spam', 'eggs')
... except Exception as inst:
- ... print(type(inst)) # the exception instance
- ... print(inst.args) # arguments stored in .args
- ... print(inst) # __str__ allows args to be printed directly,
- ... # but may be overridden in exception subclasses
- ... x, y = inst.args # unpack args
- ... print('x =', x)
- ... print('y =', y)
+ ... print(type(inst)) # the exception instance
+ ... print(inst.args) # arguments stored in .args
+ ... print(inst) # __str__ allows args to be printed directly,
+ ... # but may be overridden in exception subclasses
+ ... x, y = inst.args # unpack args
+ ... print('x =', x)
+ ... print('y =', y)
...
<class 'Exception'>
('spam', 'eggs')