[Python-ideas] make __closure__ writable
ncoghlan at gmail.com
Tue Mar 20 14:15:48 CET 2012
On Tue, Mar 20, 2012 at 11:06 PM, Yury Selivanov
<yselivanov.ml at gmail.com> wrote:
> Again, since the __code__ attribute is modifiable, and __closure__
> works in tight conjunction with it, I see no point in protecting it.
FWIW, I'm current +0 on the idea (based on Yury's reasoning here about
updating already wrapped functions), but it's going to be a while
before I can dig into the code and see if there are any *good* reasons
we protect __closure__ (rather than that protection merely being an
implementation artifact). I can't recall any off the top of my head,
but that part of the code is complex enough that I don't completely
trust my memory on that point.
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-ideas