On 8/19/06, Gary Stephenson <[EMAIL PROTECTED]> wrote:
> I discovered in my playing that ipy allows the following use (abuse?) of
> locals():
Modifying the dict returend by locals() is explicitly disallowed (see
http://docs.python.org/lib/built-in-funcs.html) so any implementation
behaviour is oka
I discovered in my playing that ipy allows the following use (abuse?) of
locals():
def test2( dic, nm ):
dic[nm] = 5
def test()
x = 10
test2( locals(), "x" )
print x # prints 5 in ipy and 10 in CPython 2.4
test()
My question is, is this by design? Can it be relied upon, or wi