Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit979b4cd

Browse files
authored
Merge pull requestrealpython#953 from apjanke/global-vs-caller-namespace
Use "local" instead of "global" to describe where imports go
2 parents4e9a305 +d012a66 commit979b4cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎docs/writing/structure.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,8 @@ bad practice. **Using** ``import *`` **makes code harder to read and makes
441441
dependencies less compartmentalized**.
442442

443443
Using ``from modu import func`` is a way to pinpoint the function you want to
444-
import and put it in theglobal namespace. While much less harmful than ``import
445-
*`` because it shows explicitly what is imported in theglobal namespace, its
444+
import and put it in thelocal namespace. While much less harmful than ``import
445+
*`` because it shows explicitly what is imported in thelocal namespace, its
446446
only advantage over a simpler ``import modu`` is that it will save a little
447447
typing.
448448

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp