From 13807790e46d4b75b90d6da17e6c28f4ed9e5a49 Mon Sep 17 00:00:00 2001 From: DaKnOb Date: Fri, 2 Oct 2015 16:42:57 +0300 Subject: Add note about Python Module Order of Import --- python.html.markdown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python.html.markdown b/python.html.markdown index 352f7349..e306dabd 100644 --- a/python.html.markdown +++ b/python.html.markdown @@ -569,6 +569,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 -- cgit v1.2.3 From 879337f9be2ef3c6ea2b01d34d2a21ad325c6cc4 Mon Sep 17 00:00:00 2001 From: DaKnOb Date: Fri, 9 Oct 2015 13:43:57 +0300 Subject: Add Python Order Of Module Import for Python 3 --- python3.html.markdown | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python3.html.markdown b/python3.html.markdown index b3acb122..f21604e4 100644 --- a/python3.html.markdown +++ b/python3.html.markdown @@ -591,6 +591,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 -- cgit v1.2.3