On Thu, May 8, 2014 at 12:17 AM, Marko Rauhamaa <ma...@pacujo.net> wrote:
> Weird. Some other tests of mine did work. But:
>
>    Note: The contents of this dictionary should not be modified; changes
>    may not affect the values of local and free variables used by the
>    interpreter. [<URL:
>    https://docs.python.org/2/library/functions.html#locals>]

If you test locals() at module level (including the interactive
interpreter), things will work, because it just returns the same dict
as globals() returns. It's only inside an actual function that it's
different and magical.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to