[Python-checkins] bpo-5978: Document that profiling needs cmd/function to return (GH-7938)

Miss Islington (bot) webhook-mailer at python.org
Sat Jul 28 08:23:45 EDT 2018


https://github.com/python/cpython/commit/c6801b48a1964d87a77f1303e0c6ddf31f54259b
commit: c6801b48a1964d87a77f1303e0c6ddf31f54259b
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-07-28T05:23:42-07:00
summary:

bpo-5978: Document that profiling needs cmd/function to return (GH-7938)


<!-- issue-number: bpo-5978 -->
https://bugs.python.org/issue5978
<!-- /issue-number -->
(cherry picked from commit 937fb55d35373fd2701078251840b6be0465a6e1)

Co-authored-by: Andrés Delfino <adelfino at gmail.com>

files:
M Doc/library/profile.rst

diff --git a/Doc/library/profile.rst b/Doc/library/profile.rst
index 3f3c8a948562..926d7757e8eb 100644
--- a/Doc/library/profile.rst
+++ b/Doc/library/profile.rst
@@ -297,6 +297,11 @@ functions:
 
       Profile ``func(*args, **kwargs)``
 
+Note that profiling will only work if the called command/function actually
+returns.  If the interpreter is terminated (e.g. via a :func:`sys.exit` call
+during the called command/function execution) no profiling results will be
+printed.
+
 .. _profile-stats:
 
 The :class:`Stats` Class



More information about the Python-checkins mailing list