From: Andrés Delfino Date: Sat, 28 Jul 2018 12:24:35 +0000 (-0300) Subject: [3.6] bpo-5978: Document that profiling needs cmd/function to return (GH-8515) X-Git-Tag: v3.6.7rc1~148 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0041d721a6f6b312ef762838d390fc4d64cf5e3a;p=thirdparty%2FPython%2Fcpython.git [3.6] bpo-5978: Document that profiling needs cmd/function to return (GH-8515) https://bugs.python.org/issue5978 (cherry picked from commit 937fb55d35373fd2701078251840b6be0465a6e1) Co-authored-by: Andrés Delfino --- diff --git a/Doc/library/profile.rst b/Doc/library/profile.rst index 32d2116e4b14..845065e38133 100644 --- a/Doc/library/profile.rst +++ b/Doc/library/profile.rst @@ -290,6 +290,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