File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -205,12 +205,17 @@ More details are at :ref:`sys-path-init`.
205205 script is calculated after the symlink is followed. In other words the
206206 directory containing the symlink is **not ** added to the module search path.
207207
208- After initialization, Python programs can modify :data: `sys.path `. The
209- directory containing the script being run is placed at the beginning of the
210- search path, ahead of the standard library path. This means that scripts in that
211- directory will be loaded instead of modules of the same name in the library
212- directory. This is an error unless the replacement is intended. See section
213- :ref: `tut-standardmodules ` for more information.
208+ After initialization, Python programs may modify :data: sys.path directly. This
209+ can be useful in some situations, but it may also lead to import-related issues
210+ if misused.
211+
212+ Independently of any manual changes, Python automatically places the directory
213+ containing the executed script at the beginning of the module search path.
214+ Because this entry precedes the standard library path, modules in the script
215+ directory can shadow standard library modules of the same name. This is usually
216+ unintended and can lead to confusing errors. See section :ref: tut-standardmodules
217+ for more information.
218+
214219
215220.. %
216221 Do we need stuff on zip files etc. ? DUBOIS
You can’t perform that action at this time.
0 commit comments