Fabio Zadrozny wrote:

> Would it be ok to add a feature request for that?

It seems a reasonable thing to suggest. Instead of
a copy, locals() could return a mapping object that
is a view of the underlying array. The only limitation
then would be that you couldn't add new keys.

> I initially thought it 
> was completely read-only, but I find it strange that it affects the 
> topmost frame correctly

That's because the topmost frame has a module's dict
as its locals, so in that case you are modifying them
directly. It's only code compiled as the body of a
function that uses an array for locals.

--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to