We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38ff17b commit 2f44acdCopy full SHA for 2f44acd
Doc/whatsnew/3.15.rst
@@ -123,12 +123,12 @@ name:
123
.. code-block:: python
124
125
lazy import json
126
- lazy from datetime import datetime
+ lazy from pathlib import Path
127
128
- print("Starting up...") # json and datetime not loaded yet
+ print("Starting up...") # json and pathlib not loaded yet
129
130
- data = json.loads('{"key": "value"}') # json gets loads here
131
- now = datetime() # datetime loads here
+ data = json.loads('{"key": "value"}') # json loads here
+ p = Path(".") # pathlib loads here
132
133
This mechanism is particularly useful for applications that import many
134
modules at the top level but may only use a subset of them in any given run.
0 commit comments