[Python-Dev] Garbage collecting closures (original) (raw)

Jeremy Hylton jeremy@zope.com
14 Apr 2003 12:16:59 -0400


On Mon, 2003-04-14 at 12:08, Guido van Rossum wrote:

I don't see the reason for this semantic restriction. IMO it could just as well be a runtime error (e.g. raising UnboundLocalError).

I can't recall why I thought this restriction was necessary. Very little code and one new opcode is required to change the compile-time error to a runtime error.

Jeremy