From c93588b944511bc0b723412d05defaaa71c07f0e Mon Sep 17 00:00:00 2001 From: pranavchoudhary-tech Date: Sat, 11 Jul 2026 11:11:55 +0530 Subject: [PATCH 1/2] gh-153528: Document `mode="func_type"` in `compile()` --- Doc/library/functions.rst | 2 ++ .../2026-07-11-11-12-00.gh-issue-153528.aBcDeF.rst | 1 + 2 files changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Documentation/2026-07-11-11-12-00.gh-issue-153528.aBcDeF.rst diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index a4d37beb436899a..eef08d8ea807e9e 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -314,6 +314,8 @@ are always available. They are listed here in alphabetical order. consists of a single expression, or ``'single'`` if it consists of a single interactive statement (in the latter case, expression statements that evaluate to something other than ``None`` will be printed). + It can also be ``'func_type'`` if *source* consists of a single :pep:`484` + signature type comment; see :func:`ast.parse` for more information. The optional arguments *flags* and *dont_inherit* control which :ref:`compiler options ` should be activated diff --git a/Misc/NEWS.d/next/Documentation/2026-07-11-11-12-00.gh-issue-153528.aBcDeF.rst b/Misc/NEWS.d/next/Documentation/2026-07-11-11-12-00.gh-issue-153528.aBcDeF.rst new file mode 100644 index 000000000000000..2da828a514cd876 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2026-07-11-11-12-00.gh-issue-153528.aBcDeF.rst @@ -0,0 +1 @@ +Document ``mode="func_type"`` in :func:`compile`. From 01a5dcd479eb8b898513ae202043a79d0a54ce53 Mon Sep 17 00:00:00 2001 From: pranavchoudhary-tech Date: Sat, 11 Jul 2026 19:30:30 +0530 Subject: [PATCH 2/2] Remove NEWS entry for documentation change --- .../Documentation/2026-07-11-11-12-00.gh-issue-153528.aBcDeF.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Misc/NEWS.d/next/Documentation/2026-07-11-11-12-00.gh-issue-153528.aBcDeF.rst diff --git a/Misc/NEWS.d/next/Documentation/2026-07-11-11-12-00.gh-issue-153528.aBcDeF.rst b/Misc/NEWS.d/next/Documentation/2026-07-11-11-12-00.gh-issue-153528.aBcDeF.rst deleted file mode 100644 index 2da828a514cd876..000000000000000 --- a/Misc/NEWS.d/next/Documentation/2026-07-11-11-12-00.gh-issue-153528.aBcDeF.rst +++ /dev/null @@ -1 +0,0 @@ -Document ``mode="func_type"`` in :func:`compile`.