Hi,
I heard time and again that you are not _supposed_ to update the
locals dictionary.
Can anyone tell me why, if the following code works, I should not do
this?
#
# Extending Local namespace
#
def fun(a=1,b=2,**a rgs):
print 'locals:',local s()
locals().update (args)
print locals()
e = {'s':3,'e':4}
fun(k=10,v=32,* *e)
thanks,
Flávio
I heard time and again that you are not _supposed_ to update the
locals dictionary.
Can anyone tell me why, if the following code works, I should not do
this?
#
# Extending Local namespace
#
def fun(a=1,b=2,**a rgs):
print 'locals:',local s()
locals().update (args)
print locals()
e = {'s':3,'e':4}
fun(k=10,v=32,* *e)
thanks,
Flávio
Comment