Re: exec'ing functions (WAS: updating locals() and globals())

2004-12-08 Thread Steven Bethard
Jeff Shannon wrote: Steven Bethard wrote: Jeff Shannon wrote: Note also that functions which use exec cannot use the static namespace optimization, and thus tend to be *much* slower than normal functions In what circumstances will this be true? I couldn't verify it: [snip] I was referring to fu

Re: exec'ing functions (WAS: updating locals() and globals())

2004-12-08 Thread Jeff Shannon
Steven Bethard wrote: Jeff Shannon wrote: Note also that functions which use exec cannot use the static namespace optimization, and thus tend to be *much* slower than normal functions In what circumstances will this be true? I couldn't verify it: [...] exec """\ def fib2(n): a, b = 0, 1