From d81108a5c7850cf2802bb866e702d1c520d8fcb1 Mon Sep 17 00:00:00 2001 From: Sacul <183588943+Sacul0457@users.noreply.github.com> Date: Sat, 3 Oct 2026 23:06:44 +0800 Subject: [PATCH] gh-142349: Update lazy import comments in whatsnew (GH-158651) * Update lazy import comments in whatsnew * Correct wording (cherry picked from commit 9a1544073ff63d57bc723b9913788fccc91f4cc0) Co-authored-by: Sacul <183588943+Sacul0457@users.noreply.github.com> --- 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 b26369636197e48..bb091b2e7388a9a 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 are not 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.