Nested scopes, and augmented assignment

Bruno Desthuilliers onurb at xiludom.gro
Fri Jul 7 06:33:54 EDT 2006


Piet van Oostrum wrote:
(snip)
> There is no big difference I think. Only Python doesn't have syntax for the
> former. Older versions of Python didn't even have nested scopes. maybe it
> was a mistake to add them.

Certainly not. Nested scopes allow closures, which allow decorators and
lot of *very* useful things. Remove this from Python, and you'll see a
*lot* of experimented programmers switch to another language.


-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list