modifying vars() dictionary?
Alex
new_name at mit.edu
Wed May 16 14:08:27 EDT 2001
> In the documentation, it says about vars():
>
> The returned dictionary should not be modified: the effects on the
> corresponding symbol table are undefined.
>
> Why are the effects undefined? Why doesn't it always work to set a
> value for variable 'x' by assigning that value to the 'x' element of
> the dictionary from vars()?
Well... it just is. You could have a look at the source code. :)
Why do you want to do this?
Alex.
More information about the Python-list
mailing list