Message187438
| Author |
ncoghlan |
| Recipients |
barry, benjamin.peterson, isoschiz, ncoghlan, pitrou, sbt |
| Date |
2013年04月20日.16:01:17 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1366473678.19.0.447520568548.issue17800@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Yeah, I've figured out that rather than exposing __del__ if tp_del is populated, or generalising the generator special case, the simplest way to make this info accessible is to be able to ask the *garbage collector* if it thinks an object needs finalising.
That actually makes this a pretty easy issue (as C issues go) - it's just a matter of exposing http://hg.python.org/cpython/file/default/Modules/gcmodule.c#l525 (has_finalizer) as gc.needs_finalizing.
It will be easier once #17468 is done though, since that will make it clearer what the documentation should say. |
|