summaryrefslogtreecommitdiffstats
path: root/Doc/library/inspect.rst
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-10-12 18:10:51 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-10-12 18:10:51 (GMT)
commit62ab10a05acdc8bb45549e4df6fd6fb5f4623aab (patch)
treeaa9923e821b0171ac71d11f9e8414fc594fcb61c /Doc/library/inspect.rst
parent5d6fbe82078fe67437755bccfa504dbbcf909a74 (diff)
downloadcpython-62ab10a05acdc8bb45549e4df6fd6fb5f4623aab.zip
cpython-62ab10a05acdc8bb45549e4df6fd6fb5f4623aab.tar.gz
cpython-62ab10a05acdc8bb45549e4df6fd6fb5f4623aab.tar.bz2
Replace mentions of IOError
Diffstat (limited to 'Doc/library/inspect.rst')
-rw-r--r--Doc/library/inspect.rst12
1 files changed, 10 insertions, 2 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
index d127ce8..ac6ae99 100644
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -355,17 +355,25 @@ Retrieving source code
argument may be a module, class, method, function, traceback, frame, or code
object. The source code is returned as a list of the lines corresponding to the
object and the line number indicates where in the original source file the first
- line of code was found. An :exc:`IOError` is raised if the source code cannot
+ line of code was found. An :exc:`OSError` is raised if the source code cannot
be retrieved.
+ .. versionchanged:: 3.3
+ :exc:`OSError` is raised instead of :exc:`IOError`, now an alias of the
+ former.
+
.. function:: getsource(object)
Return the text of the source code for an object. The argument may be a module,
class, method, function, traceback, frame, or code object. The source code is
- returned as a single string. An :exc:`IOError` is raised if the source code
+ returned as a single string. An :exc:`OSError` is raised if the source code
cannot be retrieved.
+ .. versionchanged:: 3.3
+ :exc:`OSError` is raised instead of :exc:`IOError`, now an alias of the
+ former.
+
.. function:: cleandoc(doc)