Friday, 20 January 2023

Why does the Python tutorial say it is an error that other scripts in the current directory will be loaded instead of libraries with the same name?

The Python Tutorial chapter 6 (Modules) says:

The directory containing the script being run is placed at the beginning of the search path, ahead of the standard library path. This means that scripts in that directory will be loaded instead of modules of the same name in the library directory. This is an error unless the replacement is intended.

Why is this an error? In other terms, what is the meaning of the sentence "This is an error unless the replacement is intended"?



from Why does the Python tutorial say it is an error that other scripts in the current directory will be loaded instead of libraries with the same name?

No comments:

Post a Comment