From 937fb55d35373fd2701078251840b6be0465a6e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Delfino?= Date: Sat, 28 Jul 2018 07:01:24 -0300 Subject: [PATCH] bpo-5978: Document that profiling needs cmd/function to return (GH-7938) https://bugs.python.org/issue5978 --- Doc/library/profile.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Doc/library/profile.rst b/Doc/library/profile.rst index 5e33efe1c16..1a772fb7f94 100644 --- a/Doc/library/profile.rst +++ b/Doc/library/profile.rst @@ -310,6 +310,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