changing local dictionnary for functions

Steve Holden sholden at holdenweb.com
Mon Apr 8 18:18:21 EDT 2002


"Boris Boutillier" <boris at cantal.lip6.fr> wrote in message
news:pan.2002.04.08.18.15.31.115122.19669 at cantal.lip6.fr...
> Is there a way to pass a local dictionnary to a function as it is
> possible to do with a file with the execfile statement ?
>
> In the python reference manual, in the section 4.1 : Code
> Blocks,execution frames and namespace, there is a table that say that
> function body uses globals namespace of the containing block and a new
> locals namespace. And there is a note that say global and local can be
> overrident, how is it possible ? I think it would be the answer to my
> first question.

I suspect this is an arror in the documentation, since the namespaces
provided to a function call are (unless I am mistaken) determined solely by
the context of the call. Sorry.

If  I'm wrong, you can guarantee that three different people will point this
out within three minutes of my hitting the "send" key :-)

regards
 Steve







More information about the Python-list mailing list