Merge pull request #1288 from DaKnOb/fixpymod

[python/en] Add note about Python Module Order of Import
This commit is contained in:
ven 2016-03-10 23:00:50 +01:00
commit 2c94436824
2 changed files with 11 additions and 0 deletions

View File

@ -657,6 +657,12 @@ math.sqrt == m.sqrt == sqrt # => True
import math
dir(math)
# If you have a Python script named math.py in the same
# folder as your current script, the file math.py will
# be loaded instead of the built-in Python module.
# This happens because the local folder has priority
# over Python's built-in libraries.
####################################################
## 7. Advanced

View File

@ -716,6 +716,11 @@ math.sqrt(16) == m.sqrt(16) # => True
import math
dir(math)
# If you have a Python script named math.py in the same
# folder as your current script, the file math.py will
# be loaded instead of the built-in Python module.
# This happens because the local folder has priority
# over Python's built-in libraries.
####################################################
## 7. Advanced