From 0f3001bbca8b0c87e807ba461d713407fbc39523 Mon Sep 17 00:00:00 2001 From: Sacul <183588943+Sacul0457@users.noreply.github.com> Date: Sat, 3 Oct 2026 22:43:03 +0800 Subject: [PATCH 1/2] Update lazy import comments in whatsnew --- Doc/whatsnew/3.15.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index ffd0d64b2297413..1ff8aa678501ff2 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -188,10 +188,10 @@ name: lazy import json lazy from pathlib import Path - print("Starting up...") # json and pathlib not loaded yet + print("Starting up...") # json and pathlib not are fully imported yet - data = json.loads('{"key": "value"}') # json loads here - p = Path(".") # pathlib loads here + data = json.loads('{"key": "value"}') # json gets fully imported here + p = Path(".") # pathlib gets fully imported here This mechanism is particularly useful for applications that import many modules at the top level but may only use a subset of them in any given run. From 7fe374408cec40ad46d6716ab8341a8af554f53b Mon Sep 17 00:00:00 2001 From: Sacul <183588943+Sacul0457@users.noreply.github.com> Date: Sat, 3 Oct 2026 22:48:08 +0800 Subject: [PATCH 2/2] Correct wording --- Doc/whatsnew/3.15.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 1ff8aa678501ff2..ca0f67e7c76ace9 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -188,7 +188,7 @@ name: lazy import json lazy from pathlib import Path - print("Starting up...") # json and pathlib not are fully imported yet + print("Starting up...") # json and pathlib are not fully imported yet data = json.loads('{"key": "value"}') # json gets fully imported here p = Path(".") # pathlib gets fully imported here