[Python-ideas] make __closure__ writable

Mark Shannon mark at hotpy.org
Fri Mar 16 19:37:37 CET 2012

Yury Selivanov wrote:
> Can we make the __closure__ attribute writeable?  Since __code__ already is,
> and it is possible to tackle with the opcodes, having no way of rewriting 
> __closure__ (except creating a completely new function) is annoying.

What's wrong with using a decorator?

> I don't think it will somehow harm python, as those who want to break it can
> do it already in multiple ways, easier than playing with __closure__.
> -
> Yury
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas

More information about the Python-ideas mailing list