summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMarco Buttu <marco.buttu@gmail.com>2017-03-17 08:50:23 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2017-03-17 08:50:23 (GMT)
commit3f2155ffe683080f2a1b28408fa48d43ba92f943 (patch)
tree278d84449342a3a31983440ea5645b28d3795ff7 /Doc
parent1bb0f3762ec5104014aeed0ae6e9d64598d8fcac (diff)
downloadcpython-3f2155ffe683080f2a1b28408fa48d43ba92f943.zip
cpython-3f2155ffe683080f2a1b28408fa48d43ba92f943.tar.gz
cpython-3f2155ffe683080f2a1b28408fa48d43ba92f943.tar.bz2
bpo-16355: Clarify when inspect.getcomments() returns None (#428)
Initial patch by Vajrasky Kok.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/inspect.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
index 3fa44a0..4ff2187 100644
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -442,7 +442,9 @@ Retrieving source code
Return in a single string any lines of comments immediately preceding the
object's source code (for a class, function, or method), or at the top of the
- Python source file (if the object is a module).
+ Python source file (if the object is a module). If the object's source code
+ is unavailable, return ``None``. This could happen if the object has been
+ defined in C or the interactive shell.
.. function:: getfile(object)