阅读背景:

如何在python中修改本地命名空间

来源:互联网 

How can I modify the local namespace of a function in python? I know that locals() returns the local namespace of the function when called inside it, but I want to do something like this (I have a reason why I want to do this where g is not accessible to f, but it's quicker to give a trivial, stupid example to illustrate the problem):How can I modify the local namespace of a funct




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: