[Python-ideas] make __closure__ writable

Yury Selivanov yselivanov.ml at gmail.com
Mon Mar 26 05:04:02 CEST 2012


On 2012年03月25日, at 8:32 PM, Victor Stinner wrote:
> 2012年3月16日 Yury Selivanov <yselivanov.ml at gmail.com>:
>> Can we make the __closure__ attribute writeable? Since __code__ already is, ...
>> I never understood why __code__ is writable. What is the usecase of
> modifying the code of an existing function?

Metaprogramming in its various forms. Read this thread and you'll find one 
use case.
-
Yury


More information about the Python-ideas mailing list

AltStyle によって変換されたページ (->オリジナル) /