[Python-Dev] closure semantics
Greg Ewing
greg at cosc.canterbury.ac.nz
Sat Oct 25 21:10:21 EDT 2003
> Is that compatible with current use? I think the current semantics are that
> global <name> always binds name to an object with that name at module scope.
No, it's not quite compatible, but I don't think
it's likely to break anything much in practice.
> I thought the point of this discussion was to allow the programmer
> to specify the precise scope of the object to which the variable
> would be bound, in the face of possibly multiple occurrences of the
> name.
In general the point seems to be simply about finding
*some* way to bind intermediate variables. Some suggestions
have included a way to explictly identify the scope, but
that seems like an unnecessary complication to me.
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