the directories as containing packages; this is done to prevent directories with a common name, such as string, from unintentionally hiding valid modules that occur later (deeper) on the module search path. In the simplest case, __init__.py can just be an empty file, but it can also execute initialization code for the package or set the __all__ variable, described later.
of corresponding .py file is not older than .py, it will be used. If older - compile once more. Also possible to use .pyc files without corresponding .py files.
named b.py • A byte code file named b.pyc • An optimized byte code file named b.pyo (a less common format) • A directory named b, for package imports • A compiled extension module, coded in C, C++, or another language, and dy- namically linked when imported (e.g., b.so on Linux, or b.dll or b.pyd on Cygwin and Windows) • A compiled built-in module coded in C and statically linked into Python • A ZIP file component that is automatically extracted when imported • An in-memory image, for frozen executables (Frozen modules are modules wri en in Python whose compiled byte-code object is incorporated into a custom-built Python interpreter by Python’s freeze utility. See Tools/freeze/ for now) • A Java class, in the Jython version of Python • A .NET component, in the IronPython version of Python
2. from usage with reload 3.Importing functions with same names from different modules 4. Top level assignments(assignments created outside function, class namespace) creates module a ributes 5.Namespaces could be accused as dictionaries(__dict__, dir(os))