Josiah Carlson <jcarlson@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@cosc.canterbury.ac.nz +--------------------------------------+