Skip to content

Commit 8a1cefe

Browse files
Yhg1sAA-Turner
andauthored
Update peps/pep-0810.rst
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
1 parent 01e433f commit 8a1cefe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

peps/pep-0810.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ all. Inefficiently, the user incurs this overhead again when they figure out the
5050
they want and invoke the program "for real."
5151

5252
A somewhat common way to delay imports is to move the imports into functions
53-
(inline imports), but this practice is very manual to implement and maintain.
53+
(inline imports), but this practice requires more work to implement and maintain,
54+
and can be subverted by a single inadvertent top-level import.
5455
Additionally, it obfuscates the full set of dependencies for a module. Analysis
5556
of the Python standard library shows that approximately 17% of all imports outside
5657
tests (nearly 3500 total imports across 730 files) are already placed inside

0 commit comments

Comments
 (0)