At 08:11 AM 2/7/2007 -0200, Fabio Zadrozny wrote:
>Would it be ok to add a feature request for that? I initially thought it 
>was completely read-only, but I find it strange that it affects the 
>topmost frame correctly (so, it seems that even though I get a copy, when 
>I alter that copy on the topmost frame it affects it correctly)... anyone 
>has a clue why that happens?

The code that calls the debugging hook calls PyFrame_FastToLocals() before 
invoking the debugger, and then PyFrame_LocalsToFast() afterwards.  Thus, 
the interrupted frame can have its locals modified, but no others can.

In order for this to work on other frames, you'd have to explicitly call 
PyFrame_FastToLocals(frame, 1) -- which you could probably do with ctypes 
or a C extension.

_______________________________________________
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