[pypy-dev] [mdione at grulic.org.ar: modifying locals]

Marcos Dione mdione at grulic.org.ar
Fri Oct 16 09:07:27 CEST 2015


On Fri, Oct 16, 2015 at 08:32:36AM +0200, Armin Rigo wrote:
> On Thu, Oct 15, 2015 at 4:50 PM, Marcos Dione <mdione at grulic.org.ar> wrote:
> >>     so I'll keep investigating :-]
> >
> >     maybe context managers add a stack frame/do something with them
> > internally?
> 
> Sorry, you're right.  Now it seems from looking at the CPython source
> code that there is no way.  

    could you point me where in the code? maybe thereś  a bug to fix, or
at least a reason to understand.

> This is getting quite off-topic for the
> pypy-dev list, but maybe this CPython-only awful hack:
> 
>     import ctypes
>     ctypes.pythonapi.PyFrame_LocalsToFast(ctypes.py_object(frame), 0)

    cool, thanks, I'll try that today.

-- 
(Not so) Random fortune:
La razón por la que la industria de medios es tan amiga del término
“piratería” es que inmediatamente evoca una imagen negativa, de violencia y
saqueo, en la que ellos son las víctimas que se ven privadas de “su
propiedad”. [...] en una conferencia que diera la abogada de la Federación
Internacional de la Industria Fonográfica, [...] escuchamos cómo un abogado
se alarmaba del hecho de que “la sociedad se está apropiando de la cultura”.
	    -- http://federratas.codigolibre.net/?p=137


More information about the pypy-dev mailing list