[Python-Dev] PEP 289 - Generator Expressions - Let's Move Forward

Greg Ewing greg at cosc.canterbury.ac.nz
Sun May 2 23:23:23 EDT 2004


Josiah Carlson <jcarlson at uci.edu>:

> Semantically, in the first case you are modifying your dictionary, which
> has consequences to anything that has a reference to the object. Mutable
> modification during runtime should be something we are used to by now.

The point is that anyone who's going to be confused by the difference
between early and late binding behaviour is likely to be equally
confused by this.

The issue is really about when expressions are evaluated, not when
names are bound. Patching up just one part of it (binding of free
variables) doesn't really fix the problem.

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