[Python-Dev] reference leaks, del, and annotations (original) (raw)

Tim Peters tim.peters at gmail.com
Wed Apr 5 04:40:17 CEST 2006


[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.



More information about the Python-Dev mailing list