![](https://secure.gravatar.com/avatar/157d1fe48309490ec44a0f75c933839f.jpg?s=120&d=mm&r=g)
July 27, 2017
2:17 p.m.
Hello! Here's a very simple example (Python 3):
class C: .... def t(self): .... return __class__ .... C.t.__closure__[0] <cell at 0x0000000109eca0c0: type object at 0x00007f7f82c225b0>
My question is, what's the easiest/most natural way of changing the contents of this closure cell on PyPy? On CPython there's a way using ctypes. This is regarding https://github.com/python-attrs/attrs/issues/102, but the issue boils down to this. Cheers!