Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Doc/library/inspect.rst
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,8 @@ Retrieving source code
object and the line number indicates where in the original source file the first
line of code was found. An :exc:`OSError` is raised if the source code cannot
be retrieved.
A :exc:`TypeError` is raised if the object is a built-in module, class, or
function.

.. versionchanged:: 3.3
:exc:`OSError` is raised instead of :exc:`IOError`, now an alias of the
Expand All @@ -565,6 +567,8 @@ Retrieving source code
class, method, function, traceback, frame, or code object. The source code is
returned as a single string. An :exc:`OSError` is raised if the source code
cannot be retrieved.
A :exc:`TypeError` is raised if the object is a built-in module, class, or
function.

.. versionchanged:: 3.3
:exc:`OSError` is raised instead of :exc:`IOError`, now an alias of the
Expand Down