diff --git a/README.md b/README.md index 0e1d033..3868463 100644 --- a/README.md +++ b/README.md @@ -824,7 +824,7 @@ import . # Imports a built-in or '/.py'. * **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.** -* **Imports are relative to the location of file that was passed to python command, but can be made relative to their own location with `'from .[…][[.…]] import '`.** +* **Imports are relative to the location of file that was passed to python command, but can be made relative to their location with `'from .[…][[.…]] import '`.** Closure diff --git a/index.html b/index.html index 936e033..0aa51d2 100644 --- a/index.html +++ b/index.html @@ -693,7 +693,7 @@ player = Player(point, direction) #
  • 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.
  • -
  • Imports are relative to the location of file that was passed to python command, but can be made relative to their own location with 'from .[…][<file>[.…]] import <obj>'.
  • +
  • Imports are relative to the location of file that was passed to python command, but can be made relative to their location with 'from .[…][<pkg/module>[.…]] import <obj>'.
  • #Closure

    We have/get a closure in Python when a nested function references a value of its enclosing function and then the enclosing function returns the nested function.

    def get_multiplier(a):
         def out(b):