Hi Tin,

On 27 July 2017 at 16:17, Tin Tvrtković <tinches...@gmail.com> wrote:
> My question is, what's the easiest/most natural way of changing the contents
> of this closure cell on PyPy?

On PyPy you can do (tested on PyPy2):

    cell = g.func_closure[0]
    cell.__setstate__((43,))    # sets the 'cell_contents' attribute to 43


Armin
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to