Commit aa0de3f1 authored by Georg Brandl's avatar Georg Brandl

#997912: acknowledge nested scopes in tutorial.

parent f8dd5b39
...@@ -204,10 +204,11 @@ it. ...@@ -204,10 +204,11 @@ it.
The *execution* of a function introduces a new symbol table used for the local The *execution* of a function introduces a new symbol table used for the local
variables of the function. More precisely, all variable assignments in a variables of the function. More precisely, all variable assignments in a
function store the value in the local symbol table; whereas variable references function store the value in the local symbol table; whereas variable references
first look in the local symbol table, then in the global symbol table, and then first look in the local symbol table, then in the local symbol tables of
in the table of built-in names. Thus, global variables cannot be directly enclosing functions, then in the global symbol table, and finally in the table
assigned a value within a function (unless named in a :keyword:`global` of built-in names. Thus, global variables cannot be directly assigned a value
statement), although they may be referenced. within a function (unless named in a :keyword:`global` statement), although they
may be referenced.
The actual parameters (arguments) to a function call are introduced in the local The actual parameters (arguments) to a function call are introduced in the local
symbol table of the called function when it is called; thus, arguments are symbol table of the called function when it is called; thus, arguments are
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment