Anonymus functions revisited

Duncan Booth duncan.booth at invalid.invalid
Wed Mar 23 09:47:30 EST 2005


Kay Schluehr wrote:

> A working makeVars seems not to be different from
> 
> def makeVars(**nameVals):
>    globals().update(nameVals)

Not quite. If Ron can come up with a working makeVars it would update the 
caller's globals whereas what you just posted updates makeVar's globals so 
there is a difference (when the makeVars and the calling function are in 
different modules), just not a very useful one.



More information about the Python-list mailing list