nested_scopes totally broken?

David Bolen db3l at fitlinxx.com
Mon Oct 22 18:38:04 EDT 2001


Eyal Lotem <eyal at hyperroll.com> writes:

> What I thought, was that nested scopes will implement fully-functional 
> closure behaviour, so that local function code seems to transparently run 
> in the parent-function context, and within its variable namespaces.

You might want to review PEP 227 since it covers both the intended
behavior as well as some of your other points.

In particular there is a section on "Rebinding names in enclosing
scopes" that discusses this issue (briefly, Guido wasn't in favor but
the section includes his rationale).

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list