Message297254
| Author |
njs |
| Recipients |
Mark.Shannon, arigo, belopolsky, benjamin.peterson, ncoghlan, njs, vstinner, xgdomingo, yselivanov |
| Date |
2017年06月29日.05:46:23 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1498715184.13.0.383714589293.issue30744@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> I like it because it categorically eliminates the "tracing or not?" global state dependence when it comes to manipulation of the return value of locals() - manipulating that will either always affect the original execution namespace immediately (modules, classes, exec, eval), or always be a completely independent snapshot that can never lead to changes in the original name bindings (functions, generators, coroutines).
Maybe I was unclear...? my question is why you prefer locals-making-a-copy over locals-and-f_locals-for-function-frames-return-proxy-objects. It seems to me that both of these proposals eliminate the "tracing or not?" global state dependence (right?), so this can't be a reason to prefer one over the other. And the latter additionally eliminates the distinction between modules/classes/exec/eval and functions/generators/coroutines, while also avoiding introducing a distinction between locals() and f_locals. |
|