diff --git a/README.md b/README.md index 82b99f9..da01ea7 100644 --- a/README.md +++ b/README.md @@ -817,8 +817,9 @@ import # Imports a built-in or '.py'. import # Imports a built-in or '/__init__.py'. import . # Imports a built-in or '/.py'. ``` -* **Package is a collection of multiple modules, but it can also define its own objects. Python treats any directory containing a file called `'__init__.py'` as a package.** -* **Running `'import '` does not automatically provide access to package's modules unless they are imported in its init script.** +* **Package is a collection of modules, but it can also define its own objects.** +* **On a filesystem this corresponds to a directory of Python files with an optional init script.** +* **Running `'import '` does not automatically provide access to the package's modules unless they are explicitly imported in its init script.** Closure diff --git a/index.html b/index.html index 1372d41..2e416ed 100644 --- a/index.html +++ b/index.html @@ -226,7 +226,7 @@ pre.prettyprint {
- +
@@ -847,8 +847,9 @@ creature = Creature(point, direction)
    -
  • Package is a collection of multiple modules, but it can also define its own objects. Python treats any directory containing a file called '__init__.py' as a package.
  • -
  • Running 'import <package>' does not automatically provide access to package's modules unless they are imported in its init script.
  • +
  • Package is a collection of modules, but it can also define its own objects.
  • +
  • On a filesystem this corresponds to a directory of Python files with an optional init script.
  • +
  • Running 'import <package>' does not automatically provide access to the package's modules unless they are explicitly imported in its init script.

#Closure

We have a closure in Python when:

  • A nested function references a value of its enclosing function and then
  • @@ -3016,7 +3017,7 @@ $ pyinstaller script.py --add-data '<path>:.'