https://github.com/python/cpython/commit/9a1544073ff63d57bc723b9913788fccc91f4cc0
commit: 9a1544073ff63d57bc723b9913788fccc91f4cc0
branch: main
author: Sacul <[email protected]>
committer: nedbat <[email protected]>
date: 2026-10-03T11:06:44-04:00
summary:
gh-142349: Update lazy import comments in whatsnew (#158651)
* Update lazy import comments in whatsnew
* Correct wording
files:
M Doc/whatsnew/3.15.rst
diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst
index ffd0d64b2297413..ca0f67e7c76ace9 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.
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]