[Greg Ewing] > That's really what I'm asking -- what *does* a > generator finaliser need to reference? Or does > it depend on what the generator's code does?
A generator finalizer can execute arbitrary Python code. Note that even if that was limited (which it isn't -- there are no limitations) to executing "pass", it wouldn't be exploitable, because the GIL can be released during any Python code, allowing other threads to run anything before the finalizer returns. _______________________________________________ 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