There was an error while loading. Please reload this page.
1 parent b42fdf6 commit 9a15440Copy full SHA for 9a15440
1 file changed
Doc/whatsnew/3.15.rst
@@ -188,10 +188,10 @@ name:
188
lazy import json
189
lazy from pathlib import Path
190
191
- print("Starting up...") # json and pathlib not loaded yet
+ print("Starting up...") # json and pathlib are not fully imported yet
192
193
- data = json.loads('{"key": "value"}') # json loads here
194
- p = Path(".") # pathlib loads here
+ data = json.loads('{"key": "value"}') # json gets fully imported here
+ p = Path(".") # pathlib gets fully imported here
195
196
This mechanism is particularly useful for applications that import many
197
modules at the top level but may only use a subset of them in any given run.
0 commit comments