Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1824b59

Browse files
committed
Update programmer's note on nested functions.
1 parent f3255c8 commit 1824b59

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Doc/ref/ref7.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,11 @@ \section{Function definitions\label{function}}
389389
allows the execution of multiple statements.
390390
\indexii{lambda}{form}
391391

392-
\strong{Programmer's note:} a ``\code{def}'' form executed inside a
393-
function definition defines a local function that can be returned or
394-
passed around. The semantics of name resolution in the nested
395-
function will change in Python 2.2. See the appendix for a
396-
description of the new semantics.
392+
\strong{Programmer's note:} Functions are first-class objects. A
393+
``\code{def}'' form executed inside a function definition defines a
394+
local function that can be returned or passed around. Free variables
395+
used in the nested function can access the local variables of the
396+
function containing the def. See section \ref{naming} for details.
397397

398398

399399
\section{Class definitions\label{class}}

0 commit comments

Comments
 (0)