diff --git a/README.md b/README.md index 045b4f3..672a583 100644 --- a/README.md +++ b/README.md @@ -827,7 +827,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.** -* **Location of the file that is passed to python command serves as a root of all local imports.** +* **Directory of the file that is passed to python command serves as a root of local imports.** * **For relative imports use `'from .[…][[.…]] import '`.** @@ -927,7 +927,7 @@ def fib(n): return n if n < 2 else fib(n-2) + fib(n-1) ``` * **Default size of the cache is 128 values. Passing `'maxsize=None'` makes it unbounded.** -* **CPython interpreter limits recursion depth to 1000 by default. To increase it use `'sys.setrecursionlimit()'`.** +* **CPython interpreter limits recursion depth to 3000 by default. To increase it use `'sys.setrecursionlimit()'`.** ### Parametrized Decorator **A decorator that accepts arguments and returns a normal decorator that accepts a function.** @@ -1501,8 +1501,8 @@ Exit ```python import sys sys.exit() # Exits with exit code 0 (success). -sys.exit() # Prints to stderr and exits with 1. sys.exit() # Exits with the passed exit code. +sys.exit() # Prints to stderr and exits with 1. ``` diff --git a/index.html b/index.html index d4e5cc6..1426856 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@
- +
@@ -696,7 +696,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.
  • -
  • Location of the file that is passed to python command serves as a root of all local imports.
  • +
  • Directory of the file that is passed to python command serves as a root of local imports.
  • For relative imports use '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):
    @@ -779,7 +779,7 @@ player = Player(point, direction)                   #
     
     
    • Default size of the cache is 128 values. Passing 'maxsize=None' makes it unbounded.
    • -
    • CPython interpreter limits recursion depth to 1000 by default. To increase it use 'sys.setrecursionlimit(<int>)'.
    • +
    • CPython interpreter limits recursion depth to 3000 by default. To increase it use 'sys.setrecursionlimit(<int>)'.

    Parametrized Decorator

    A decorator that accepts arguments and returns a normal decorator that accepts a function.

    from functools import wraps
     
    @@ -1274,8 +1274,8 @@ error_msg = ''.join(traceback.format_exception(
     
     

    #Exit

    Exits the interpreter by raising SystemExit exception.

    import sys
     sys.exit()                        # Exits with exit code 0 (success).
    -sys.exit(<el>)                    # Prints to stderr and exits with 1.
     sys.exit(<int>)                   # Exits with the passed exit code.
    +sys.exit(<obj>)                   # Prints to stderr and exits with 1.
     
    @@ -2932,7 +2932,7 @@ $ deactivate # Deactivates the activ