https://github.com/python/cpython/commit/6d9b6f9905dbb57b1323fc4a3c4b5336de6de0e2 commit: 6d9b6f9905dbb57b1323fc4a3c4b5336de6de0e2 branch: 3.15 author: Miss Islington (bot) <[email protected]> committer: hugovk <[email protected]> date: 2026-10-03T19:05:30+03:00 summary:
[3.15] gh-142349: Update lazy import comments in whatsnew (GH-158651) (#158652) Co-authored-by: Sacul <[email protected]> files: M Doc/whatsnew/3.15.rst 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. _______________________________________________ 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]
