[Python-Dev] replacing 'global'

Greg Ewing greg at cosc.canterbury.ac.nz
Mon Oct 27 20:48:21 EST 2003

Alex Martelli <aleaxit at yahoo.com>:

> My slight preference for leaving += and friends alone is that
> a function using them to rebind nonlocals would be hard to
> read

Using my "outer" suggestion, augmented assignments to
nonlocals would be written

  outer x += 1

which would make the intention pretty clear, I think.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+

More information about the Python-Dev mailing list