Skip to content

Commit 6d9b6f9

Browse files
[3.15] gh-142349: Update lazy import comments in whatsnew (GH-158651) (#158652)
Co-authored-by: Sacul <183588943+Sacul0457@users.noreply.github.com>
1 parent 81c50e9 commit 6d9b6f9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎Doc/whatsnew/3.15.rst‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,10 @@ name:
188188
lazy import json
189189
lazy from pathlib import Path
190190
191-
print("Starting up...") # json and pathlib not loaded yet
191+
print("Starting up...") # json and pathlib are not fully imported yet
192192
193-
data = json.loads('{"key": "value"}') # json loads here
194-
p = Path(".") # pathlib loads here
193+
data = json.loads('{"key": "value"}') # json gets fully imported here
194+
p = Path(".") # pathlib gets fully imported here
195195
196196
This mechanism is particularly useful for applications that import many
197197
modules at the top level but may only use a subset of them in any given run.

0 commit comments

Comments
 (0)