Skip to content

Commit 177a040

Browse files
Aaron WieczorekAaron Wieczorek
authored andcommitted
Doc: Simplify getsource note per review feedback
1 parent c4c8d7c commit 177a040

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Doc/library/inspect.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -699,10 +699,9 @@ Retrieving source code
699699
function.
700700

701701
.. note::
702-
This function returns the *lines* of source code where the object is
703-
defined. If multiple objects are defined on the same line (e.g.
704-
multiple lambdas), or if the object is embedded in a larger statement
705-
(e.g. a list comprehension), the function will return the entire line(s).
702+
This function returns the lines of source code where the object is
703+
defined, including indentation. It always returns full lines and does not
704+
strip other code that may appear on the same line.
706705

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

0 commit comments

Comments
 (0)