summaryrefslogtreecommitdiff
path: root/Technology
diff options
context:
space:
mode:
Diffstat (limited to 'Technology')
-rw-r--r--Technology/Python.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/Technology/Python.md b/Technology/Python.md
index 265abf3..3d3fdf3 100644
--- a/Technology/Python.md
+++ b/Technology/Python.md
@@ -23,7 +23,6 @@ with no arg show you all name in global namespace
dir() == sorted(globals().keys())
-local namespace
gloabls() == locals()
super() - goes trought inheritance chain and return the class that is after the one passed as the function first argument. Can by used to bypass modification made by earlier classes.
@@ -51,9 +50,13 @@ importlib if want to reload modules so run more than once
When importing a module you can use it's defined functions, classes, constants etc...
Access those thing by putting the module name as prefix before the function
+import XX
import XX as x
from XX import x
-from XX import *
from XX import x as x
when you run a modules as a script __ name__ becomes __ main__
+
+
+__ init__.py - required to tell python dir is a pkg (initialise a pkg)
+used to set the __ all__ variable & import submodules