Jim Jewett wrote:
(2) A function as a parameter isn't good enough, because the passed-in function can't see bindings in the surrounding larger function. (It still sees the lexical scope it which it was defined.)
That sounds confused, because the lexical scope it which it was defined is exactly what it *should* see.
(4) A thunk could be used today be creating a string (rather than a pre-compiled function) and substituting in the thunk's string
Again, you seem to be under a misapprehension about how code blocks should work. They should be lexically scoped, not dynamically scoped.
(7) A __leave__ or __exit__ special method really turns into another name for __del__.
Not really. A PEP-310-style __exit__ method is explicitly invoked at well-defined times, not left until the object is reclaimed. It doesn't suffer from any of the problems of __del__.
-- Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | [EMAIL PROTECTED] +--------------------------------------+ _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com